From a22e23113d1265a02261dfe7c53e326d8e0532cc Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Tue, 15 Jul 2014 11:58:30 +0100 Subject: [PATCH] Issue #2291439 by Wim Leers, tstoeckler: Fixed CKEditor's "readonly" needs to be per-instance but is applied per-format, across instances. --- core/modules/ckeditor/js/ckeditor.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/modules/ckeditor/js/ckeditor.js b/core/modules/ckeditor/js/ckeditor.js index 8c8af022aca0..54c2b647434f 100644 --- a/core/modules/ckeditor/js/ckeditor.js +++ b/core/modules/ckeditor/js/ckeditor.js @@ -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); },