Hey Everyone,
I've got a question. I want to make the body of the CKEditor readonly by applying contenteditable='false' to the body.
I achieved this with this command:
var editor = CKEDITOR.instances.editor;
editor.document.$.body.setAttribute("contenteditable","false");
I wrapped this code like this:
editor.on('mode', function() {
}
Which triggers it to go into readonly mode during 3 events:
1. The editor is loaded.
2. Source mode is entered
3. wysiwyg mode is entered.
Then I took a div tag and I set a size constraint and made the contents editable. This forces the user to only create content within the size constraint that I determine.
Only weird part is that if I am in full screen mode, if I hit back enough times, the div disappears and the body becomes editable...
I've got a question. I want to make the body of the CKEditor readonly by applying contenteditable='false' to the body.
I achieved this with this command:
var editor = CKEDITOR.instances.editor;
editor.document.$.body.setAttribute("contenteditable","false");
I wrapped this code like this:
editor.on('mode', function() {
}
Which triggers it to go into readonly mode during 3 events:
1. The editor is loaded.
2. Source mode is entered
3. wysiwyg mode is entered.
Then I took a div tag and I set a size constraint and made the contents editable. This forces the user to only create content within the size constraint that I determine.
Only weird part is that if I am in full screen mode, if I hit back enough times, the div disappears and the body becomes editable...
Re: CKEditor Main Body = Readonly Mode
And when select header text and click on Format dropdown list the code changes:
Have anybody some idea how to solve this problem ?
Thanks M.
Re: CKEditor Main Body = Readonly Mode
i've got similar problem and described in the post below
viewtopic.php?f=11&t=21859
Re: CKEditor Main Body = Readonly Mode
Thanks for your reply i also checked this topic, but i
downloaded nightly build and behavior is still same, block element is not inserted into <div> with content editable attribute. And is pasted as sibling of this element with same attributes except id attribute.
M.