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.hasClass('insinject') )
- evt.data.dialog = 'injectDialog';
- } );
- editor.contextMenu.addListener( function( element ) {
- if ( element.getAscendant( 'insinject', true ) ) {
- return { abbrItem: CKEDITOR.TRISTATE_OFF };
- }
- });
- }
- CKEDITOR.dialog.add( 'injectDialog', this.path + 'dialogs/inject.js?v=2' );
- }
- });
|