In - INP-1174Getting 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 http://codemirror.net/doc/manual.html).
- on "change" event (the "InitEditors" function in "forms.js") for textarea controlled by CodeMirror set value in CodeMirror to match one from textarea
- in the "popups/editor" template, when changing textarea value based on CKEditor data also trigger "change" event
- 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