Skip to content

Current support for HTML serialization #1872

Answered by 12joan
gisete asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure what's causing the warning about useLayoutEffect; it seems to be a problem relating to SSR in slate-react. It should be safe to ignore if you're not using SSR in your app. In reality, you probably won't be calling serializeHtml on every render anyway, and certainly not when rendering on the server.

The reason you can't use editor in the onChange handler of your Plate component is because the editor state is only available inside the Plate component (or PlateProvider if you're using it). This is consistent with how state normally works in React: you can't access state higher up in the component tree than it's defined unless you pass it up manually using callbacks.

I don't know…

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@12joan
Comment options

Comment options

You must be logged in to vote
3 replies
@Eskalifer1
Comment options

@12joan
Comment options

@Lokheim
Comment options

Answer selected by zbeyens
Comment options

You must be logged in to vote
1 reply
@12joan
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants