12345678910111213141516171819202122232425262728293031323334 |
- CKEDITOR.plugins.add( 'inject', {
- icons: 'inject',
- init: function( editor ) {
- editor.addCommand( 'inject', new CKEDITOR.dialogCommand( 'injectDialog' ) );
- editor.ui.addButton( 'Inject', {
- label: 'Вставьте Inject',
- command: 'inject',
- toolbar: 'insert'
- });
-
- if ( editor.contextMenu ) {
- editor.addMenuGroup( 'injectGroup' );
- editor.addMenuItem( 'injectItem', {
- label: 'Редактировать Inject ',
- icon: this.path + 'icons/inject.png',
- command: 'inject',
- group: 'injectGroup'
- });
- editor.on( 'doubleclick', function( evt ) {
- var element = evt.data.element;
- if ( $(element).attr('id') == 'inject' )
- evt.data.dialog = 'injectDialog';
- } );
- editor.contextMenu.addListener( function( element ) {
- if ( element.getAscendant( 'inject', true ) ) {
- return { abbrItem: CKEDITOR.TRISTATE_OFF };
- }
- });
- }
- CKEDITOR.dialog.add( 'injectDialog', this.path + 'dialogs/inject.js' );
- }
- });
|