Replies: 1 comment
-
|
https://github.com/yjs/y-prosemirror/ library has import { yDocToProsemirrorJSON } from 'y-prosemirror'
// ...
store: async ({ document, documentName, state }) => {
const json = yDocToProsemirrorJSON(document, 'default')
// ...
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the hocuspocus to save a tiptap document via the standard extension-database (which is awesome!).
What I'd like to do is extract from the document state the first node and save it in the db separately as a title. So my tiptap content might be something like
<><heading>Header</heading>....</>, I want to saveHeaderas a separate column.How can I parse
stateserver-side/node?Beta Was this translation helpful? Give feedback.
All reactions