ryancramerdesign / InputfieldCKEditor

CKEditor Inputfield module for ProcessWire
8 stars 4 forks source link

Disabling auto inline mode #19

Open teppokoivula opened 10 years ago

teppokoivula commented 10 years ago

At the moment it seems that CKEditor is automatically adding inline tools for all textarea instances with contenteditable attribute set to true. Please correct me if I'm wrong, but this doesn't seem like correct behaviour?

I stumbled into this while working on proof-of-concept Trumbowyg inputfield, which also uses contenteditable. The problem is that unless I add "CKEDITOR.disableAutoInline = true;" into it's JS file, CKEditor keeps adding it's own toolbar on top of Trumbowygs.. :)

ryancramerdesign commented 9 years ago

Looking in the code for this module, I can't find anything where we are targeting all textareas. I'm guessing it's CKEditor itself adding those toolbars, outside of what we'd configured it to do. Though if you find any appropriate restrictions that we can somehow configure with CKE, please let me know (I haven't seen any).

teppokoivula commented 9 years ago

@ryancramerdesign that's right -- it's default behaviour for CKEditor. Without disableAutoInline = true, it can't properly co-exist on same page with contenteditable non-CKEditor fields.

IMHO in this situation correct thing to do would be disabling auto-inline in InputfieldCKEditor.js. That's already done when inline editors are found; the problem wouldn't exist if it was done regardless of whether inline editors exist :)