ckeditor5-svelte icon indicating copy to clipboard operation
ckeditor5-svelte copied to clipboard

CKEditor 5 does not have a read only setter

Open IsAvaible opened this issue 3 years ago • 2 comments

Problem Line 42 of Ckeditor.svelte tries to set the read-only status with this piece of code: editor.isReadOnly = disabled;. This is not supported by CKEditor 5, because read-only has no setter. Read more here.

Screenshot of the error message image

Suggested Solution Since I don't see the purpose of disabling the editor anyway, I would suggest removing the line altogether.

IsAvaible avatar May 21 '22 06:05 IsAvaible

@IsAvaible that's true, also if you need to disable de editor you can always do that on the onReady function. Anyways, I fix it in my project using the new CKEditor method enableReadOnlyMode( ), @techlab23 I created a PR with that fix.

jecovier avatar Jun 04 '22 17:06 jecovier

Hi, I tried to use this package in my project and encountered the same error, even though I see that it was corrected in commit 2733412c6cfef15d3c7e936745b70550c1db8618

I installed the package directly from the GitHub URL, and it worked fine, unlike the version installed via npm. It seems the npm package needs to be updated to include the latest changes.

th3c0r avatar Aug 22 '24 10:08 th3c0r