12345678910111213141516171819202122232425262728293031323334 |
- CKEDITOR.plugins.add( 'seting', {
- icons: 'seting',
- init: function( editor ) {
- editor.addCommand( 'seting', new CKEDITOR.dialogCommand( 'setingDialog' ) );
- editor.ui.addButton( 'seting', {
- label: 'Áëîê íàñòðîåê',
- command: 'seting',
- toolbar: 'insert'
- });
- if ( editor.contextMenu ) {
- editor.addMenuGroup( 'setingGroup' );
- editor.addMenuItem( 'setingItem', {
- label: 'Ðåäàêòèðîâàòü íàñòðîéêè ',
- icon: this.path + 'icons/seting.png',
- command: 'seting',
- group: 'setingGroup'
- });
- editor.on( 'doubleclick', function( evt ) {
- var element = evt.data.element;
- if ( element.getAttribute('id') == 'widgetseting' )
- evt.data.dialog = 'setingDialog';
- } );
- editor.contextMenu.addListener( function( element ) {
- if ( element.getAscendant( 'seting', true ) ) {
- return { setingItem: CKEDITOR.TRISTATE_OFF };
- }
- });
- }
- CKEDITOR.dialog.add( 'setingDialog', this.path + 'dialogs/seting.js' );
- }
- });
|