CKEditor (vBulletin 内) に独自のツールバー ボタンを追加しようとしていました。以下は私のコードです:
CKEDITOR.plugins.add( 'app',
{
init: function( editor )
{
editor.addCommand( 'AppWidget',
{
modes : { source : 1, wysiwyg : 1 },
exec : function( editor )
{
alert("foo");
}
});
editor.ui.addButton( 'app',
{
label: 'App Widget',
command: 'AppWidget',
icon: this.path + 'app.png'
} );
}
} );
問題は: WYSIWYG モードでは表示されますが、ソース モードでは無効 (グレー表示) になります。しかし、ソースモードでこのボタンを有効にする必要があります。私が書く場合:
modes : { source : 1 },
どちらのモードでも無効になります。
これに関するヒントはありますか?前もって感謝します。