Getting Tiptap state on the server
Using @liveblocks/node
, it’s possible
to retrieve the state of your Tiptap document, and its
Y.Doc
, on the server.
Getting Tiptap document state
Using
Liveblocks.getYjsDocumentAsBinaryUpdate
you can fetch your Yjs data, and place it inside a Y.Doc
. Because Tiptap is a
wrapper around ProseMirror, we can then call yDocToProseMirror
from
y-prosemirror
to retrieve the Tiptap
editor’s state.
If you’d like to edit your document, make sure to read
how to use your Y.Doc
on the server.