Slate: Using Slate inside iframe

Created on 12 Oct 2020  路  6Comments  路  Source: ianstormtaylor/slate

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

All 6 comments

Any updates here?

Up

@CameronAckermanSEL @ianstormtaylor could you please take a look on this issue? We are created PR to fix this also

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

We dropped slate usage and currently replacing it with draft js

@rndm2 i built a custom contenteditable for one use case, using draftjs for another use case.

Slate looks so good though :(

Working with draftjs is a huge pain for me.

Was this page helpful?
0 / 5 - 0 ratings