Closed abdallahalsamman closed 3 months ago
@abdallahalsamman Thank you for reporting the issue! We've been trying to reproduce it without success. Could you please provide more context or a video? Additionally, if there are any console messages associated with the issue, they would be helpful. I've attached a video showing our attempt.
https://github.com/kommitters/editorjs-undo/assets/64106728/dfe376ac-3bb3-4130-a54c-e5f8f02fd027
@abdallahalsamman While attempting to reproduce the reported issue, we found a related issue related to the redo action, which has already been worked on pull request #244. However, we have not yet been able to reproduce your reported issue.
I will update the package and test to see if the issue is still happening
@MarioRodriguezS it's still happening here even after I upgrade to 2.0.26
Screencast from 26-03-24 23:20:27.webm
I pressed contrl z so many times
function initEditor(editorjs_div) {
const initialData = JSON.parse(editorjs_div.dataset.editorjsData);
const editor = new EditorJS({
holder: 'editorjs',
data: initialData,
tools: {
header: {
class: Header,
inlineToolbar: true
},
list: {
class: List,
inlineToolbar: true
},
table: Table,
assistant: {
class: Assistant,
config: {
assistantUrl: editorjs_div.dataset.assistantUrl,
csrfToken: document.querySelector('input[name="_token"]').value
},
shortcut: 'CTRL+M'
}
},
onReady: () => {
const undo = new Undo({
editor,
config: {
shortcuts: {
undo: 'CTRL+Z',
redo: 'CTRL+SHIFT+Z'
}
}
});
undo.initialize(initialData);
},
onChange: _.debounce(() => mySaveFunction(editor, editorjs_div), 200)
});
}
@abdallahalsamman The plugin expects CMD
rather than CTRL
. CMD will be set up automatically as Ctrl or ⌘ depending on the client OS. Try updating the shortcuts:
shortcuts: {
undo: 'CMD+Z',
redo: 'CMD+SHIFT+Z'
}
@abdallahalsamman Indeed, there is a bug when performing the action you mentioned. Once you have properly set up the plugin, you will encounter it. We will be working on fixing it as soon as possible.
@abdallahalsamman Thanks again for reporting the issue, it was solved and the solution is available in v2.0.27. Let us know if it is helpful to you.
Cheers.
Precheck
Description
if I put the cursor in the middle of paragraph text and hit enter, I will have a new paragraph with the right part of text.
Now if I hit ctrl + z, nothing happens.
Environment
Editor.js version: 2.0.26
Plugins you use with their versions: "@editorjs/editorjs": "^2.29.0", "@editorjs/header": "^2.8.1", "@editorjs/list": "^1.9.0", "@editorjs/table": "^2.3.0", "@tailwindcss/typography": "^0.5.10", "editorjs-undo": "^2.0.26",
Device, Browser, OS: Ubuntu, Firefox Snap 123.0.1 (64-bit)
Current behavior
Nothing happens on ctrl + z
Expected behavior
Undo show remove the new paragraph and put the text how it was
Additional context
Add any other context about the problem here.