GrapesJS / ckeditor

This plugin replaces the default Rich Text Editor with the one from CKEditor
BSD 3-Clause "New" or "Revised" License
105 stars 103 forks source link

How to enable or deactivate ckeditor for label component? #76

Closed kla-ko closed 11 months ago

kla-ko commented 11 months ago

I have integrated the ckeditor-plugin via <script src="https://unpkg.com/grapesjs-plugin-ckeditor"></script> in my html head. Works fine for the standard text component and others. When using the label component from grapesjs-plugin-forms, I'm getting an error when trying to enter the label text.

It's the same issue as described in https://github.com/GrapesJS/ckeditor/issues/71 . However, I don't know how to apply the there mentioned fix, because I'm just declaring the plugin grapesjs-plugin-ckeditor and I have no access to a variable called CKEDITOR, which would allow me to set CKEDITOR.dtd.$editable.span = 1.

Any ideas? I'd be fine with deactivating ckeditor for the label component and use the standard text editor.

Regards,

kla-ko commented 11 months ago

Found a solution: I can access window.CKEDITOR and set window.CKEDITOR.dtd.$editable.label = 1.