我需要向对话框发送参数数据。
这是我在插件.js中的代码(右键单击)。
editor.addCommand( 'editDialog', {
exec: function( editor) {
CKEDITOR.currentInstance.openDialog('editDialog');
}
});
if ( editor.contextMenu )
{
editor.addMenuGroup( 'myGroup' );
editor.addMenuItem( 'sliderItem',
{
label : 'Edit Gallery',
command : 'editDialog',
group : 'myGroup'
});
editor.contextMenu.addListener( function( element )
{
if ( element ){
element = element.getAscendant( 'wscms-gallery', true );
}
if ( element && !element.isReadOnly() && !element.data( 'cke-realelement' ) ){
return { sliderItem : CKEDITOR.TRISTATE_OFF};
}
return null;
});
}
我希望右键单击并点击编辑图库时,向editDialog发送任何参数。
最好的祝愿