こんにちは、drupal で CKEditor のカスタム ボタンを追加したいと考えています。プラグインを作成しましたが、ckeditor ツールバーに表示されません。誰かが私を助けることができますか?コードは次のとおりです。
plugin.js
CKEDITOR.plugins.add('newplugin',
{
init: function(editor)
{
var pluginName = 'newplugin';
CKEDITOR.dialog.add(pluginName, this.path + 'plugin.js');
editor.addCommand(pluginName, new CKEDITOR.dialogCommand(pluginName));
editor.ui.addButton('Newplugin',
{
label: 'Footnote or Citation',
icon: this.path + 'newplugin.png',
command: pluginName
});
}
});
config.js
CKEDITOR.editorConfig = function( config )
{
config.extraPlugins = 'newplugin';
config.toolbar = [
['Bold'],['Italic'],['newplugin']
]
};