CKEditor - 内联:以禁用模式显示 [英] CKEditor - inline: showing up in disabled mode

查看:467
本文介绍了CKEditor - 内联:以禁用模式显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在内联模式下使用CKEditor,如下所示:

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

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

单击div时,CKEditor工具栏将显示,但所有按钮都被禁用,我可以'编辑任何东西。当使用CKEDITOR.replace(..) - 我得到了正常的编辑器,一切正常。任何想法内联设置有什么问题?
谢谢

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

推荐答案

该元素( div.content )需要将 contenteditable 属性设置为 true 。没有它,它处于正常的只读模式。

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 ] );

这篇关于CKEditor - 内联:以禁用模式显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆