Child pages
  • [cms] Changed value from CKEditor not saved in CodeMirror control [5.3.0-B1]
Skip to end of metadata
Go to start of metadata

In  INP-1174 - Getting issue details... STATUS  task we've replaced all textarea controls, where HTML was entered with nice CodeMirror instances, which allowed to have content aware (determines language automatically) syntax highlighing for every textarea:

However we forgot, that CKEditor (which is invoked using button below field name on the left) is accessing underlying textarea directly and doesn't check if it's actually a CodeMirror instance to use dedicated setValue method on it (see


  1. on "change" event (the "InitEditors" function in "forms.js") for textarea controlled by CodeMirror set value in CodeMirror to match one from textarea
  2. in the "popups/editor" template, when changing textarea value based on CKEditor data also trigger "change" event
  3. in the "InitEditors" function in "forms.js" for each CodeMirror instance:
    • set "readOnly" CodeMirror option, when textarea is disabled
    • on textarea listen for "refresh" event and when it happens sync "readOnly" option of CodeMirror based on textarea disabled state

Related Tasks

INP-1698 - Getting issue details... STATUS