This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
How to clear the editor content? #316
Unanswered
anniesexton
asked this question in
General
Replies: 2 comments
-
You should be able to change |
Beta Was this translation helpful? Give feedback.
0 replies
-
Gotcha! I'll give that a go, thanks! |
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
-
I'm trying to figure out how to programmatically clear the editor content. Changing defaultValue to an empty string doesn't seem to do it, and I've read that modifying the
value
property isn't recommended either, correct?The best I've come up with is by setting the
.innerHTML
of the main.ProseMirror
div. Is this the best way to go about clearing the editor? This feels very un-React, wondering if there's a better way to do this.Any and all suggestions are much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions