Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何更改CKEditor的默认按钮_Html_Ckeditor_Textarea - Fatal编程技术网

Html 如何更改CKEditor的默认按钮

Html 如何更改CKEditor的默认按钮,html,ckeditor,textarea,Html,Ckeditor,Textarea,对不起,如果这看起来很简单,但我无法通过搜索谷歌找到我的问题的答案 我想更改CKEditor的默认布局。我的表单中有几个文本区域应转换为ckeditor,因此正如文档所述,我将它们的类别更改为: class="ckeditor" 但是当加载表单时,所有文本区域都会打开,其中包含完整的按钮,而我想过滤一些按钮。一个明显的解决方案是单独更改每个文本区域的布局。但是,您知道一步就能做到这一点的方法吗(比如更改默认布局,如果它存在的话) 感谢您阅读我在这里找到了答案 //这实际上是默认值 config

对不起,如果这看起来很简单,但我无法通过搜索谷歌找到我的问题的答案

我想更改
CKEditor
的默认布局。我的表单中有几个文本区域应转换为ckeditor,因此正如文档所述,我将它们的类别更改为:

class="ckeditor"
但是当加载表单时,所有文本区域都会打开,其中包含完整的按钮,而我想过滤一些按钮。一个明显的解决方案是单独更改每个文本区域的布局。但是,您知道一步就能做到这一点的方法吗(比如更改默认布局,如果它存在的话)


感谢您阅读

我在这里找到了答案

//这实际上是默认值

config.toolbar =
[
    { 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' ] },
    '/',
    { name: 'styles',      items : [ 'Styles','Format','Font','FontSize' ] },
    { name: 'colors',      items : [ 'TextColor','BGColor' ] },
    { name: 'tools',       items : [ 'Maximize', 'ShowBlocks','-','About' ] }
];
只需删除您不想出现在文本区域中的项目

其他默认值也可以通过
config