Issue #2291439 by Wim Leers, tstoeckler: Fixed CKEditor's "readonly" needs to be per-instance but is applied per-format, across instances.

8.0.x
Alex Pott 2014-07-15 11:58:30 +01:00
parent 7a42da238c
commit a22e23113d
1 changed files with 2 additions and 4 deletions

View File

@ -14,10 +14,8 @@
// CKEditor initializes itself in a read-only state if the 'disabled'
// attribute is set. It does not respect the 'readonly' attribute,
// however, so we set the 'readOnly' configuration property manually in
// that case.
if (element.hasAttribute('readonly')) {
format.editorSettings.readOnly = true;
}
// that case, for the CKEditor instance that's about to be created.
format.editorSettings.readOnly = element.hasAttribute('readonly');
return !!CKEDITOR.replace(element, format.editorSettings);
},