1
こんにちはDrupalでCKEditorのカスタムボタンを追加したいと思います。私はプラグインを作成しましたが、それは私の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']
]
};
Drupalは... CKEditorを使用しますか? **編集:**ああ... YUIリッチエディタ –
お返事ありがとうございます。うん、それはCKEditorを使った – Newborn