我正在使用CKEditor(v.4.4.7)并尝试包含下划线功能。完整的包装有比我的用户需要更多的按钮,标准包装不包括此按钮。我用构建器来定制。我从标准页面开始添加(或者可能已经存在)" Basic Styles",在描述中说:
"This plugin adds the following basic formatting commands to the editor:
Bold
Italic
Underline
Strikethrough
Subscript
Superscript
"
当我在代码中运行编辑器时,我只能获得Bold,Italic和Strikethrough。没有下划线(或下标或上标,就此而言)。为了获得其他功能,我需要做什么?
我的配置文件:
/**
* @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here.
// For complete reference see:
// http://docs.ckeditor.com/#!/api/CKEDITOR.config
// The toolbar groups arrangement, optimized for two toolbar rows.
config.toolbarGroups = [
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
{ name: 'links' },
{ name: 'insert' },
{ name: 'forms' },
{ name: 'tools' },
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'others' },
'/',
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
{ name: 'styles' },
{ name: 'colors' },
{ name: 'about' }
];
// Remove some buttons provided by the standard plugins, which are
// not needed in the Standard(s) toolbar.
config.removeButtons = 'Underline,Subscript,Superscript';
// Set the most common block elements.
config.format_tags = 'p;h1;h2;h3;pre';
// Simplify the dialog windows.
config.removeDialogTabs = 'image:advanced;link:advanced';
};
感谢。
答案 0 :(得分:2)
您是否尝试阅读粘贴的配置?它说:
// Remove some buttons provided by the standard plugins, which are
// not needed in the Standard(s) toolbar.
config.removeButtons = 'Underline,Subscript,Superscript';
我希望答案足够了;)。