question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using Slate inside iframe

See original GitHub issue

Bug When you’re using slate inside iframe you cant handle any events with custom handlers. As I researched its caused by isDOMNode(target) function because you using instanceof to compare if target is Node. Since every environment (every iframe, frame, window) has it’s own internal classes for Node, Array, Object, etc. it will be false in this cases so it makes slate pretty useless after update to 0.59.0 version

Slate: 0.59.0 Browser: Chrome OS: MacOS

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:6

github_iconTop GitHub Comments

1reaction
rndm2commented, Nov 13, 2020

We dropped slate usage and currently replacing it with draft js

1reaction
volkandkayacommented, Nov 13, 2020

Was looking at the slate docs and was so impressed. Then forgot it doesn’t work in an iframe.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rendering in iframes - Slate Examples
In this example, the document gets rendered into a controlled <iframe> . This is particularly useful, when you need to separate the styles...
Read more >
How to embed youtube videos in rich text documents with ...
How to embed youtube videos in rich text documents with slate.js · 1. Setup · 2. Add a slate element for youtube embeds...
Read more >
Embedding youtube videos in rich text documents with slate js
Embedding media such as youtube or vimeo links in a rich text document is a very common feature in rich text editors (in...
Read more >
Embed a Contour board in an iframe in Object Explorer or Slate
You can then optionally include ?embedded=true at the end of the URL to remove the workspace bar, which results in a frame that...
Read more >
Advanced • Palantir
The Code Sandbox widget loads in the following order: Slate (the parent frame context containing the widget) loads, then the widget iframe loads....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found