-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
[BUG] Undo/redo state is immutable #557
Labels
bug
Something isn't working
Comments
@mjp0 Did you find out, if that possible to make onReset() on everything? Cause all ref is returning is { current: null }. I am assuming we need to do something custom, like .selectAll elements in Editor currently, and then make them all look like this:
Thats the 1 idea i have left. |
@mjp0 Here, take
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I can't figure out how to reset undo/redo. I'm using MDXEditor with doc browser and clicking a doc opens it in the editor. I have tried to create a separate ref for each doc but nothing seems to reset undo/redo state.
Reproduction
Re-render MDXEditor with different ref or key, and undo/redo state stays.
Expected behavior
I'd love to have
editorsRef.current.reset()
or something similar to reset everything.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: