Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to restore a snapshot #72

Open
joacub opened this issue Oct 17, 2021 · 0 comments
Open

How to restore a snapshot #72

joacub opened this issue Oct 17, 2021 · 0 comments
Labels
wontfix This will not be worked on

Comments

@joacub
Copy link

joacub commented Oct 17, 2021

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

@joacub joacub added the wontfix This will not be worked on label Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant