Inline Ckeditor: all buttons are disabled

I'm currently trying to add inline ckeditor to some text.

There are no javascript errors, but unfortunately all the tools are disabled, and I can’t edit the text.

http://fiddle.jshell.net/5LuyD/

Does anyone know what I'm doing wrong?

+5
source share
6 answers

What you are missing is an attribute contenteditable="true"for your item. If you want the editor to be configured (i.e., walked through CKEDITOR.inline( element, cfg )), install first CKEDITOR.disableAutoInline = true;.

With CKEDITOR.disableAutoInline = true;all elements contenteditable="true"must be initialized manually to become an instance of the editor. See the official manual for embedded instances.

+7
source

contenteditable = "true" !

. http://fiddle.jshell.net/5LuyD/1/

+2

, , contenteditable="true", Chrome , contenteditable false, ( ) .

: http://ckeditor.com/forums/CKEditor/Solved-Chrome-Toolbar-buttons-grayed-out-for-INLINE-editor

, : a) , CKEDITOR.inline() b) ( CKE ).

+2

, . ( ) : none contenteditable will = false ( chrome).

This fix worked for me:

var ck = CKEDITOR.inline(element);
ck.on('instanceReady', function(event) {
     var editor = event.editor;
     editor.setReadOnly(false);
});

Link: https://dev.ckeditor.com/ticket/9814

+1
source

I had the same problem and none of the other solutions suggested worked.

The problem was that the id attribute for the div started with a numeric character (it was a GUID). Change the identifier to start working with the alpha symbol: all the editor buttons have been enabled.

For some reason, ckEditor does not like an identifier starting with numeric characters.

0
source
$(document).ready(function(){
    for(var i in CKEDITOR.instances) {
                var ck=CKEDITOR.instances[i]; 
                ck.on( 'instanceReady', function( ev ) {
                 var editor = ev.editor;
             editor.setReadOnly( false );
    });
}});
0
source

All Articles