You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
886 B
33 lines
886 B
CKEDITOR.plugins.add( 'filerimage', {
|
|
icons: 'filerimage',
|
|
init: function( editor ) {
|
|
editor.addCommand( 'filerImageDialog', new CKEDITOR.dialogCommand( 'filerImageDialog' ) );
|
|
|
|
editor.ui.addButton( 'Filer Image', {
|
|
label: 'Insert filer image',
|
|
command: 'filerImageDialog',
|
|
toolbar: 'insert',
|
|
icon: 'filerimage'
|
|
});
|
|
|
|
if ( editor.contextMenu ) {
|
|
editor.addMenuGroup( 'Filer' );
|
|
editor.addMenuItem( 'imageItem', {
|
|
label: 'Edit image',
|
|
icon: this.path + 'icons/filerimage.png',
|
|
command: 'filerImageDialog',
|
|
group: 'Filer'
|
|
});
|
|
|
|
editor.contextMenu.addListener( function( element ) {
|
|
if ( element.getAscendant( 'img', true ) ) {
|
|
return { imageItem: CKEDITOR.TRISTATE_OFF };
|
|
}
|
|
});
|
|
}
|
|
|
|
CKEDITOR.dialog.add( 'filerImageDialog', this.path + 'dialogs/filerImageDialog.js' );
|
|
|
|
var dialog = CKEDITOR.dialog.getCurrent();
|
|
}
|
|
});
|
|
|