Skip to content

Collaboration Editor do not work #4517

Closed
Closed

Description

@jeremieamstutz

Description

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.

Plate version

49.1.13

Slate React version

1.1.0

Activity

  1. dosubot commented on Jul 25, 2025

    @dosubot

    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.

    To reply, just mention @dosu.


    How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

  2. locked and limited conversation to collaborators on Jul 26, 2025
  3. converted this issue into a discussion #4519 on Jul 26, 2025
  4. added theissue type on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions