kommitters / editorjs-undo

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

Save request in read-mode when using multiple editors #207

Closed egg- closed 1 year ago

egg- commented 1 year ago

Precheck

Description

When using multiple editorjs on a single page, when changing the readonly setting of some editors, an error is returned saying that it cannot be saved in read-only mode.

Environment

Current behavior

The operation is find, but the error is reported in the console.

Editor.js:2 Uncaught (in promise) Error: Editor's content can not be saved in read-only mode
    at n.value (editor.js:2:1)
    at e.save (editor.js:2:1)
    at Undo.registerChange (index.js:128:1)
    at index.js:54:1
    at Observer.<anonymous> (observer.js:21:1)
    at observer.js:87:1

Expected behavior

Check the editor's read mode and do not request save in read mode.

Additional context

-

miguelnietoa commented 1 year ago

Hello! We just released v2.0.22 which includes the fix for this issue! Thank you @egg- for making this contribution 👏🏻