You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When editing any content type that uses CKEditor5, when you click 'Save', the editor is destroyed and you can see a flash of plain HTML where the editor used to be. This looks funky and confuses less-savvy users.
See video which demonstrates the behavior on a clean install:
ckeditor_html_flash.webm
Steps To Reproduce
To reproduce the behavior:
Create a clean install of Backdrop (optional)
Click to "Create Page"
Make sure the editor is set to Basic, and using CKEditor for the Body field.
Type anything into the Body field
Save, and watch closely, you will see a flash of HTML.
Actual behavior
See video above.
Solution!
There's no reason to destroy the editor (line 123 of core/modules.ckeditor5/js/ckeditor5.js) if the form is being submitted anyway.
I have a kludge/hack that actually fixes this; will submit a PR shortly. Basically, I set a variable if I know the form is submitting, then, in ckeditor5.js, I only call editor.destroy() if we are NOT submitting the form. This works in my case, but I don't know if it works in all situations.
Additional information
Add any other information that could help, such as:
Backdrop CMS version: 1.34.0
Web server and its version: Apache 2.4.65
PHP version: 8.1.34
Database sever (MySQL or MariaDB?) and its version: MariaDB 10.7.8
Description of the bug
When editing any content type that uses CKEditor5, when you click 'Save', the editor is destroyed and you can see a flash of plain HTML where the editor used to be. This looks funky and confuses less-savvy users.
See video which demonstrates the behavior on a clean install:
ckeditor_html_flash.webm
Steps To Reproduce
To reproduce the behavior:
Actual behavior
See video above.
Solution!
There's no reason to destroy the editor
(line 123 of core/modules.ckeditor5/js/ckeditor5.js)if the form is being submitted anyway.I have a kludge/hack that actually fixes this; will submit a PR shortly. Basically, I set a variable if I know the form is submitting, then, in ckeditor5.js, I only call
editor.destroy()if we are NOT submitting the form. This works in my case, but I don't know if it works in all situations.Additional information
Add any other information that could help, such as: