Open joacub opened 3 years ago
I already have the doc update but I don't know how to apply this to prose mirror editor, when apply im losing all the history Im using the next code to apply the snapshot
const newProsemirrorDoc = yDocToProsemirror(editor.schema, yDoc); editorView.state.doc = newProsemirrorDoc; editorView.dispatch( editorView.state.tr.setMeta(ySyncPluginKey, { restore: true, snapshot: yState.snapshot, }) );
any suggestion for how to apply the update
I already have the doc update but I don't know how to apply this to prose mirror editor, when apply im losing all the history Im using the next code to apply the snapshot
any suggestion for how to apply the update