kommitters / editorjs-undo

Undo/Redo feature for Editor.js
https://www.npmjs.com/package/editorjs-undo
MIT License
169 stars 51 forks source link

Redo action #214

Closed xkzl closed 1 year ago

xkzl commented 1 year ago

Hi,

I have implemented undo in my editojs (last version)

[...]
        Object.assign(options, {
            holder: editorId, 
            onReady: async () => {

                const config = {
                    debounceTimer: 100,
                    shortcuts: {
                      undo: 'CMD+Z',
                      redo: 'CMD+SHIFT+Z'
                    }
                  }

                new Undo({ editor, config });

            },

            onChange:() => { 

                editor.save().then((savedData) =>{
                    $("#"+id).val(JSON.stringify(savedData));
                }).catch((error) =>{
                    console.log("Failed to save editor modification.. ", error)
                })
            }
        });

        var editor = new EditorJs(options);

Calling CMD+Z undo properly but nothing happen whatever combination I provide to redo. Is that and issue or a mis configuration maybe ?

juanmagiraldor commented 1 year ago

Hello! We just released v2.0.23 which includes the fix for this issue!

We kindly invite you to give this new version a spin to see if the problem has been successfully resolved.

Thank you @xkzl for making this contribution 👏🏻