Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
egg- opened this issue May 12, 2023 · 1 comment · Fixed by #208
Closed
3 tasks done

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

egg- opened this issue May 12, 2023 · 1 comment · Fixed by #208
Labels
🐞 Bug Something isn't working ⛑ Needs triage Someone is checking

Comments

@egg-
Copy link
Contributor

egg- commented May 12, 2023

Precheck

  • Do a quick search and make sure the bug has not been reported yet.
  • Please disclose security vulnerabilities privately at oss@kommit.co.
  • Finally, be nice and have fun!.

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

  • Editor.js version: 2.26.5
  • Plugins you use with their versions: 2.0.20
  • Device, Browser, OS:

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

@egg- egg- added ⛑ Needs triage Someone is checking 🐞 Bug Something isn't working labels May 12, 2023
@egg- egg- changed the title Changed from edit mode to read mode, but attempts to save. Save request in read-mode when using multiple editors May 12, 2023
@egg- egg- closed this as completed May 16, 2023
@miguelnietoa
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Something isn't working ⛑ Needs triage Someone is checking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants