Open Jean-PhilippeD opened 10 months ago
Hello I am having this same issue as well. It makes the plugin effectively unusable in practice. Would really appreciate if someone can work on this one. Thank you!!
Hello @Jean-PhilippeD, thanks for reporting the issue, we were checking and now with version 2.0.27
it is not occurring, please try with the latest version and let us know if it works for you.
Hello @juliandsg0222 . I have the same problem as @Jean-PhilippeD.
editorJS.current = new EditorJS({
holder: "something",
data: defaultBlock,
...
onReady() {
if (!!editorJS.current) {
new Undo({
editor: editorJS.current,
maxLength: 20,
config: {
debounceTimer: 100,
shortcuts: {
undo: 'CMD+Z',
redo: 'CMD+SHIFT+Z',
},
},
});
...
}
},
〜〜
<div id="something"/>
**If Undo is performed immediately after the block data is mounted with the default value (defaultBlock), all block data will be lost. A subsequent Redo will restore the original data.
It seems to me that this could be avoided by determining if this is not the initial state before attempting to perform Undo, can this be fixed?**
Hello @n2-freevas, thanks for the report, could you tell us which versions of editorjs
and editorjs-undo
you are using?
Hi @juliandsg0222 I continue to have the same issue on 2.0.27. Here is a loom video where I walk through the issue.
@juliandsg0222
I've been using 2.0.27
Hello everyone 👋 @n2-freevas, @ARH3, @Jean-PhilippeD, We are currently working to fix these issues, at the moment to fix the problem of @ARH3 you can try preserving blank space in a paragraph, this problem had arisen a long time ago, you can check the discussion here https://github.com/codex-team/editor.js/discussions/1868#discussioncomment-1983196
Precheck
Description
I use undo (and dragDrop which doesn't work by the way) and when I want to rollback some text with ctrl+Z sometimes it's working fine, sometimes it does erase whole blocks, append new empty block at the beginning, duplicates some other blocks...
I have no idea what's happening...
Environment
Current behavior
Here is the behavior :
I initialize editorJs like this :
Expected behavior
Undo to works fine :)