在CKEditor'中配置/删除单个按钮;s';来源';组

在CKEditor'中配置/删除单个按钮;s';来源';组,ckeditor,Ckeditor,我读过很多关于CKEditor 4中缺少按钮列表文档的帖子,我还发现一些帖子,其中个人甚至根据他们的测试发布了一个按钮项目列表 但是,我的客户要求删除源组中的特定按钮—注释、取消注释和HTML标记自动完成按钮 CKEDITOR.config.codemirror = { // Whether or not to show the search Code button on the toolbar showSearchButton: false, // Whether or not

我读过很多关于CKEditor 4中缺少按钮列表文档的帖子,我还发现一些帖子,其中个人甚至根据他们的测试发布了一个按钮项目列表

但是,我的客户要求删除源组中的特定按钮—注释、取消注释和HTML标记自动完成按钮

CKEDITOR.config.codemirror = {
// Whether or not to show the search Code button on the toolbar
   showSearchButton: false,

   // Whether or not to show Trailing Spaces
   showTrailingSpace: true,

    // Whether or not to show the format button on the toolbar
    showFormatButton: false,

    // Whether or not to show the comment button on the toolbar
    showCommentButton: false,

    // Whether or not to show the uncomment button on the toolbar
    showUncommentButton: false,

    // Whether or not to show the showAutoCompleteButton button on the toolbar
    showAutoCompleteButton: false
};
是否有人知道这些将与removeButtons()一起使用的按钮的正确名称

我已经测试过明显的注释、取消注释、自动完成,但它们没有效果


谢谢。

对于以后偶然发现这一点的人

这些按钮是由codemirror插件添加的。Codemirror的配置不包括这些按钮

CKEDITOR.config.codemirror = {
// Whether or not to show the search Code button on the toolbar
   showSearchButton: false,

   // Whether or not to show Trailing Spaces
   showTrailingSpace: true,

    // Whether or not to show the format button on the toolbar
    showFormatButton: false,

    // Whether or not to show the comment button on the toolbar
    showCommentButton: false,

    // Whether or not to show the uncomment button on the toolbar
    showUncommentButton: false,

    // Whether or not to show the showAutoCompleteButton button on the toolbar
    showAutoCompleteButton: false
};

我知道OP已经晚了,但是对于任何感兴趣的人来说,CodeMirror插件工具栏的默认配置是(包括Sourcedialog):

要使用
removeButtons()
函数删除特定按钮,您可以将每个按钮名称添加到数组中,因此对于所讨论的情况:

removeButtons: 'CommentSelectedRange,UncommentSelectedRange,AutoComplete'

请注意,按钮的名称区分大小写。

CKEditor不包括那些“注释、取消注释和HTML标记自动完成”按钮,请检查您安装的插件以查找按钮名称。显示您的配置plz:)抱歉造成混淆。问题在于包含了codemirror插件。使用CKBuilder功能的一点是,如果以后需要自定义,很难知道您正在使用什么,因为有太多的配置信息写入到主js文件中。