Closed fedorin-git closed 1 year ago
Hello @fedorin-git , I hope you are doing well.
Thanks a lot for raising the issue. I checked, and the error may occur when the EditorJs is instantiated more than once, maybe related to the React hard reload which duplicates the editor each render. It could be your case possibly?
If not, I will appreciate it if you could give us more information about the issue to replicate the same problem you are getting.
Best regards.
Hi @fedorin-git, I tested this and this is working as you can see in the following gif
When my index.js root.render is like this:
root.render(
<App />
);
But, If you use StrictMode like this:
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
Then, a duplicated error will happen:
Here you are more detailed information about StrictMode: https://mariosfakiolas.com/blog/my-react-components-render-twice-and-drive-me-crazy/
Also, we recommend you read the README.md usage section: https://github.com/kommitters/editorjs-undo#usage
Closing this, please let us know if the issue keeps happening to you.
Description
Undo does not work in document with initial data
Environment
Steps to reproduce:
Current behavior
Expected behavior
Changes should be rolled back in appropriate order or appearance
Implementation code
Note:
Work well in empty document.