我已阅读the guide,但仍不确定如何将toolbar
更改为指向其他设置。
我的config.js.coffee
:
CKEDITOR.editorConfig = (config) ->
config.extraPlugins = 'lite'
config.toolbar_Basic = [
{ name: 'clipboard', items: [ 'PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items: [ 'Replace' ] },
{ name: 'basicstyles', items: [ 'Bold','Italic','Underline','Subscript','Superscript' ] },
config.toolbar_Advanced = [
{ name: 'clipboard', items: [ 'PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items: [ 'Replace' ] },
{ name: 'basicstyles', items: [ 'Bold','Italic','Underline','Subscript','Superscript' ] },
{ name: 'lite', items: [ 'lite-toggletracking', '-', 'lite-acceptall', 'lite-acceptone', '-', 'lite-rejectall', 'lite-rejectone' ] },
]
config.toolbar = 'Basic'
lite = config.lite = config.lite || {}
true
是否有一种简单的方法可以在每个实例的Basic
和Advanced
工具栏之间进行选择?理想情况下,我可以使用添加到textarea
的类。
答案 0 :(得分:0)
调用CKEditor
时,请为个别toolbar
实例指定CKEditor
,如下所示:
CKEDITOR.replace('editor1', { toolbar: 'Basic' });
或
CKEDITOR.replace('editor2', { toolbar: 'Advanced' });