CKEditor:按钮未出现
我想在CKEditor的工具栏中添加一个按钮,但按钮没有出现。这是保存在CKEditor:按钮未出现,ckeditor,Ckeditor,我想在CKEditor的工具栏中添加一个按钮,但按钮没有出现。这是保存在\u source/plugins/footnote/ CKEDITOR.plugins.add('footnote', { init: function(editor) { var pluginName = 'footnote'; CKEDITOR.dialog.add(pluginName, this.path + 'dialogs/footnote.js');
\u source/plugins/footnote/
CKEDITOR.plugins.add('footnote',
{
init: function(editor)
{
var pluginName = 'footnote';
CKEDITOR.dialog.add(pluginName, this.path + 'dialogs/footnote.js');
editor.addCommand(pluginName, new CKEDITOR.dialogCommand(pluginName));
editor.ui.addButton('Footnote',
{
label: 'Footnote or Citation',
command: pluginName
});
}
});
这是config.js的代码
CKEDITOR.editorConfig = function( config )
{
config.toolbar = 'MyToolbar';
config.extraPlugins = 'footnote';
config.toolbar_MyToolbar =
[
['Bold','Footnote','Italic']
];
};
工具栏上只显示粗体和斜体,但不显示脚注按钮。
感谢您的帮助。您没有提供图标:
CKEDITOR.plugins.add('footnote',
{
icons: 'myfootnote',
init: function (editor) {
var pluginName = 'footnote';
CKEDITOR.dialog.add(pluginName, this.path + 'dialogs/footnote.js');
editor.addCommand(pluginName, new CKEDITOR.dialogCommand(pluginName));
editor.ui.addButton('Footnote',
{
label: 'Footnote or Citation',
icon: 'myfootnote',
command: pluginName
});
}
});
确保在/plugins/footnote/icons/myfootnote.png创建一个图标
仅接受PNG。按钮必须具有相同的名称(区分大小写) 因此,将
editor.ui.addButton('Footnote',
替换为editor.ui.addButton('Footnote',