CKEditor 4:如何强制 "framed" 模式
CKEditor 4: how to force the "framed" mode
CKEditor自动使用"inline"模式,而我想使用"framed"模式。
这种情况发生在我身上,即使阅读文档看起来不正常,我也可能做错了什么。
我有一个简单的文本区域,我也尝试向其中添加 contenteditable
属性,但没有成功。
<textarea name="text" class="form-control wysiwyg editor" id="text" rows="10" contenteditable="false"></textarea>
这是我用来初始化编辑器的代码:
$(function () {
$('.editor.wysiwyg').each(function () {
CKEDITOR.disableAutoInline = true;
CKEDITOR.replace(this.id, {
disableNativeSpellChecker: false,
fontSize_sizes: '10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;30/30px;',
height: 375,
image2_alignClasses: [ 'float-left', 'text-center', 'float-right' ],
insertpre_class: false,
removeButtons: 'Font',
removeDialogTabs: false,
tabSpaces: 4,
toolbarCanCollapse: true,
toolbarGroups: [
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
{ name: 'links' },
{ name: 'insert' },
{ name: 'forms' },
{ name: 'tools' },
{ name: 'others' },
'/',
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
{ name: 'styles' },
{ name: 'colors' },
{ name: 'about' }
],
});
});
});
我已阅读 this and this page 文档,但没有发现任何有用的内容。
我正在使用 jQuery 适配器。
我该怎么办?谢谢。
已解决。
问题是由divarea plugin. Instead, we need to use the IFrame Editing Area插件引起的。
事实上,在插件页面中是这样解释的:
This is the core functionality of the classic, iframe-based editor which can only be disabled if it is backfilled by an alternative plugin (such as Div Editing Area) or if only inline editor is used.
很遗憾,文档中没有对此进行解释(如何向负责文档的人报告?)。
所以我确保我有正确的插件,然后我使用 removePlugins 配置选项禁用 divarea
插件。
CKEditor自动使用"inline"模式,而我想使用"framed"模式。
这种情况发生在我身上,即使阅读文档看起来不正常,我也可能做错了什么。
我有一个简单的文本区域,我也尝试向其中添加 contenteditable
属性,但没有成功。
<textarea name="text" class="form-control wysiwyg editor" id="text" rows="10" contenteditable="false"></textarea>
这是我用来初始化编辑器的代码:
$(function () {
$('.editor.wysiwyg').each(function () {
CKEDITOR.disableAutoInline = true;
CKEDITOR.replace(this.id, {
disableNativeSpellChecker: false,
fontSize_sizes: '10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;30/30px;',
height: 375,
image2_alignClasses: [ 'float-left', 'text-center', 'float-right' ],
insertpre_class: false,
removeButtons: 'Font',
removeDialogTabs: false,
tabSpaces: 4,
toolbarCanCollapse: true,
toolbarGroups: [
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
{ name: 'links' },
{ name: 'insert' },
{ name: 'forms' },
{ name: 'tools' },
{ name: 'others' },
'/',
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
{ name: 'styles' },
{ name: 'colors' },
{ name: 'about' }
],
});
});
});
我已阅读 this and this page 文档,但没有发现任何有用的内容。
我正在使用 jQuery 适配器。
我该怎么办?谢谢。
已解决。
问题是由divarea plugin. Instead, we need to use the IFrame Editing Area插件引起的。
事实上,在插件页面中是这样解释的:
This is the core functionality of the classic, iframe-based editor which can only be disabled if it is backfilled by an alternative plugin (such as Div Editing Area) or if only inline editor is used.
很遗憾,文档中没有对此进行解释(如何向负责文档的人报告?)。
所以我确保我有正确的插件,然后我使用 removePlugins 配置选项禁用 divarea
插件。