How do I reset a document you to empty? #220
Answered
by
lucywang000
damianthekreeeytor
asked this question in
Q&A
-
I would like to reset a document to empty or an initial state. How would I go about doing that or b point in the right direction. I am using the React eco-system. |
Beta Was this translation helpful? Give feedback.
Answered by
lucywang000
Jul 13, 2021
Replies: 1 comment 1 reply
-
You can dispatch a transaction that does something like |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
kepta
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can dispatch a transaction that does something like
tr.replaceWith(0, state.doc.content.size, yourInitialDoc)