How to use your Y.Doc on the server
@liveblocks/node, it’s possible
to retrieve your Yjs document and use it as a
Y.Doc on the server. This is often helpful
for retrieving text editor state, and we have some specific guides for this:
you can fetch your Yjs data, and place it inside a
Note that any changes you make will not be applied to other users, as the
Y.Doc is not connected to any providers.
Should you wish to send any changes to your document to other users, you can
yDoc as a binary update, and use
to apply the change.
These changes will be immediately applied to all connected users.