You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed the guide to create a collaborative text editor, but the content is always empty and it's impossible to type. If the file do a hot reload (I don't reload the page manually), it works perfectly.
This is a known timing issue with collaborative editors using Plate and Yjs. If the editor initializes before Yjs content is loaded, Plate's normalization logic inserts an empty paragraph, making the editor appear empty and unresponsive until a hot reload resets the state.
To fix this, set skipInitialization: true in your Plate editor config and only call editor.getApi(YjsPlugin).yjs.init after the editor is mounted and Yjs has synced. This ensures Plate doesn't insert a default value before Yjs content arrives and avoids double-initialization or extra paragraphs. Make sure your Yjs provider isn't briefly presenting an empty doc on load. See more details and examples in this discussion: Plate collaborative editor initialization with Yjs.
If you still see issues, double-check that Plate isn't initializing with a default value before Yjs syncs. If you can share your provider setup or initialization code, I can help spot any other problems.
Activity
dosubot commentedon Jul 25, 2025
This is a known timing issue with collaborative editors using Plate and Yjs. If the editor initializes before Yjs content is loaded, Plate's normalization logic inserts an empty paragraph, making the editor appear empty and unresponsive until a hot reload resets the state.
To fix this, set
skipInitialization: truein your Plate editor config and only calleditor.getApi(YjsPlugin).yjs.initafter the editor is mounted and Yjs has synced. This ensures Plate doesn't insert a default value before Yjs content arrives and avoids double-initialization or extra paragraphs. Make sure your Yjs provider isn't briefly presenting an empty doc on load. See more details and examples in this discussion: Plate collaborative editor initialization with Yjs.If you still see issues, double-check that Plate isn't initializing with a default value before Yjs syncs. If you can share your provider setup or initialization code, I can help spot any other problems.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
