我已经阅读了许多有关CKEditor 4中按钮列表缺乏文档的帖子,并且我发现了个人甚至根据他们的测试发布了按钮项目的列表。<<<<<<<<<<<<<<<</p>
但是,我的客户要求的是删除源组中的特定按钮 - 注释,uncomment和html标签自动完成按钮。
有人知道这些按钮的正确按钮名称,这些按钮将与RemoveButtons()?
一起使用我已经测试了显而易见的 - 评论,不满意,自动完成 - 但它们没有效果。
谢谢。
我知道OP迟到了,但是对于任何有兴趣的人来说, codemirror 插件工具栏的默认配置是(包括 sourcedialog/em>):
{ name: 'document', items: [ 'Source', 'Sourcedialog', 'autoFormat', 'CommentSelectedRange', 'UncommentSelectedRange', 'AutoComplete' ] }
要使用removeButtons()
功能删除特定按钮,您可以将每个按钮名称添加到数组中,因此对于有问题的情况:
removeButtons: 'CommentSelectedRange,UncommentSelectedRange,AutoComplete'
注意按钮的名称为 case-sentive 。
,以后在
上偶然发现了这一点。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
};