CKEditor - inline: showing up in disabled mode

怎甘沉沦 提交于 2019-12-12 16:43:55

问题


i'm trying to use CKEditor in inline mode like the following:

var div = $("div.content");
CKEDITOR.disableAutoInline = true;
CKEDITOR.inline( div[0]);

when clicking the div, the CKEditor toolbar will show up, but all buttons are disabled and i can't edit anything. When using CKEDITOR.replace(..) - i'm getting the normal editor and anything works fine. any ideas what's wrong with the inline setup? thanks


回答1:


That element (div.content) needs to have a contenteditable attribute set to true. Without it, it's in normal, read-only mode.

var div = $( 'div.content' );
div.attr( 'contenteditable', 'true' );
CKEDITOR.disableAutoInline = true;
CKEDITOR.inline( div[ 0 ] );


来源:https://stackoverflow.com/questions/16761351/ckeditor-inline-showing-up-in-disabled-mode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!