When using paragraphs with a long text field, an error is thrown when switching from a non-CKEditor enabled input format to a CKEditor enabled format. This error is different based on the CKEditor library that is installed.
4.2.1: CKEditor fails to load and throws a "TypeError: a.element is undefined" in ckeditor.js
4.5.5: CKEditor loads and logs the following in the console. I suspect that it has gotten smarter to block destroying while the editor is still loading.
[CKEDITOR] Error code: editor-incorrect-destroy.
[CKEDITOR] For more information about this error go to http://docs.ckeditor.com/#!/guide/dev_errors-section-editor-incorrect-de...
Cause:
While the editor is initializing, something triggers a change and the ckeditor.util.js attempts to destroy the editor while it's still initializing.
Potentially related issues:
These both are changing the destroy but were caused by panels / ctools and the patch does not fix destroying while initializing.
#1990224: Problem with Panels IPE
#1974754: Panels: CKEditor does not always appear (javascript error)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | ckeditor-stop-destroy-if-loading-2632096-3.patch | 1.78 KB | recrit |
Comments
Comment #2
recrit commentedComment #3
recrit commentedThe attached patch adds a "Drupal.ckeditor_is_loading" to track textareas that are still loading. This is used to skip destroying the editor if it is still loading.