从CKEditor文本编辑器中删除一些功能

时间:2013-06-12 09:23:42

标签: php ckeditor

如何从CKEditor文本编辑器中删除某些功能?我只需要粗体等基本功能。

2 个答案:

答案 0 :(得分:1)

要从编辑器中删除功能,您应该在config.plugins中调整your config,如:

config.plugins = 'usefulPlugin, anotherUsefulPlugin, ...'

另一种可能性是来自当前配置的remove undesired plugins

config.removePlugins = 'unwantedPlugin, anotherUnwantedPlugin, ...'

此外,您可以使用official CKEditor builder并创建自己的编辑器包,方法是选择在GUI中有用的内容。

毕竟,你可以adjust the toolbar。请注意,更改工具栏不会影响在编辑器实例中运行的功能 - 它们仍然已加载,但仍在工作但无法通过工具栏访问。如果你不控制它,这可能是麻烦制造者。

答案 1 :(得分:-2)

下面是CKEditor的一些基本设置

config.toolbar = 'Full';

config.toolbar_Full =
[
    { name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
    { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
    { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
    { name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 
        'HiddenField' ] },
    '/',
    { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
    { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
    '-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
    { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
    { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
    '/',
    { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
    { name: 'colors', items : [ 'TextColor','BGColor' ] },
    { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }
];

config.toolbar_Basic =
[
    ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink','-','About']
];
相关问题