Ticket #2836: 2836.patch
File 2836.patch, 13.4 KB (added by , 15 years ago) |
---|
-
_source/plugins/blockquote/plugin.js
277 277 278 278 selection.selectBookmarks( bookmarks ); 279 279 editor.focus(); 280 } 280 }, 281 activeInModes : [ 'wysiwyg' ] 281 282 }; 282 283 283 284 CKEDITOR.plugins.add( 'blockquote', -
_source/plugins/clipboard/plugin.js
72 72 alert( editor.lang.clipboard[ this.type + 'Error' ] ); // Show cutError or copyError. 73 73 74 74 return success; 75 } 75 }, 76 activeInModes : [ 'wysiwyg' ] 76 77 }; 77 78 78 79 // Paste command. … … 89 90 { 90 91 editor.openDialog( 'paste' ); 91 92 } 92 } 93 }, 94 activeInModes : [ 'wysiwyg' ] 93 95 } 94 96 : 95 97 { … … 108 110 // Open the paste dialog. 109 111 editor.openDialog( 'paste' ); 110 112 } 111 } 113 }, 114 activeInModes : [ 'wysiwyg' ] 112 115 }; 113 116 114 117 // Listens for some clipboard related keystrokes, so they get customized. -
_source/plugins/dialog/plugin.js
2226 2226 * // Register the "link" command, which opens the "link" dialog. 2227 2227 * editor.addCommand( 'link', <b>new CKEDITOR.dialogCommand( 'link' )</b> ); 2228 2228 */ 2229 CKEDITOR.dialogCommand = function( dialogName )2229 CKEDITOR.dialogCommand = function( dialogName, commandDefinition ) 2230 2230 { 2231 2231 this.dialogName = dialogName; 2232 CKEDITOR.tools.extend( this, commandDefinition ); 2232 2233 }; 2233 2234 2234 2235 CKEDITOR.dialogCommand.prototype = -
_source/plugins/editingblock/plugin.js
168 168 }); 169 169 } 170 170 171 // Enable and disable commands. 172 for ( i in this._.commands ) 173 { 174 var command = this._.commands[ i ]; 175 if ( command.activeInModes ) 176 { 177 var index = CKEDITOR.tools.indexOf( command.activeInModes, mode ), 178 state = ( index == -1 ) ? CKEDITOR.TRISTATE_DISABLED : CKEDITOR.TRISTATE_OFF; 179 180 if ( command.state != state ) 181 command.state = state; 182 } 183 } 184 171 185 modeEditor.load( holderElement, ( typeof data ) != 'string' ? this.getData() : data); 172 186 }; 173 187 -
_source/plugins/forms/plugin.js
17 17 'border: 1px dotted #FF0000;' + 18 18 'padding: 2px;' + 19 19 '}' ); 20 21 var commandDefinition = 22 { 23 activeInModes : [ 'wysiwyg' ] 24 } 25 20 26 // All buttons use the same code to register. So, to avoid 21 27 // duplications, let's use this tool function. 22 28 var addButtonCommand = function( buttonName, commandName, dialogFile ) 23 29 { 24 editor.addCommand( commandName, new CKEDITOR.dialogCommand( commandName ) );25 30 31 editor.addCommand( commandName, new CKEDITOR.dialogCommand( commandName, commandDefinition ) ); 26 32 editor.ui.addButton( buttonName, 27 33 { 28 34 label : editor.lang.common[ commandName ], … … 41 47 addButtonCommand( 'Button', 'button', dialogPath + 'button.js' ); 42 48 addButtonCommand( 'ImageButton', 'imagebutton', CKEDITOR.plugins.getPath('image') + 'dialogs/image.js' ); 43 49 addButtonCommand( 'HiddenField', 'hiddenfield', dialogPath + 'hiddenfield.js' ); 44 45 50 }, 46 51 requires : [ 'image' ] 47 52 } ); -
_source/plugins/horizontalrule/plugin.js
14 14 exec : function( editor ) 15 15 { 16 16 editor.insertElement( editor.document.createElement( 'hr' ) ); 17 } 17 }, 18 activeInModes : [ 'wysiwyg' ] 18 19 }; 19 20 20 21 var pluginName = 'horizontalrule'; -
_source/plugins/image/plugin.js
17 17 CKEDITOR.dialog.add( pluginName, this.path + 'dialogs/image.js' ); 18 18 19 19 // Register the command. 20 editor.addCommand( pluginName, new CKEDITOR.dialogCommand( pluginName ) ); 20 var commandDefinition = 21 { 22 activeInModes : [ 'wysiwyg' ] 23 } 24 editor.addCommand( pluginName, new CKEDITOR.dialogCommand( pluginName, commandDefinition ) ); 21 25 22 26 // Register the toolbar button. 23 27 editor.ui.addButton( 'Image', -
_source/plugins/indent/plugin.js
251 251 editor.focus(); 252 252 editor.forceNextSelectionCheck(); 253 253 selection.selectBookmarks( bookmarks ); 254 } 254 }, 255 activeInModes : [ 'wysiwyg' ] 255 256 }; 256 257 257 258 CKEDITOR.plugins.add( 'indent', -
_source/plugins/justify/plugin.js
105 105 editor.focus(); 106 106 editor.forceNextSelectionCheck(); 107 107 selection.selectBookmarks( bookmarks ); 108 } 108 }, 109 activeInModes : [ 'wysiwyg' ] 109 110 }; 110 111 111 112 CKEDITOR.plugins.add( 'justify', -
_source/plugins/link/plugin.js
7 7 { 8 8 init : function( editor, pluginPath ) 9 9 { 10 var commandDefinition = 11 { 12 activeInModes : [ 'wysiwyg' ] 13 } 10 14 // Add the link and unlink buttons. 11 editor.addCommand( 'link', new CKEDITOR.dialogCommand( 'link' ) );12 editor.addCommand( 'anchor', new CKEDITOR.dialogCommand( 'anchor' ) );15 editor.addCommand( 'link', new CKEDITOR.dialogCommand( 'link', commandDefinition ) ); 16 editor.addCommand( 'anchor', new CKEDITOR.dialogCommand( 'anchor', commandDefinition ) ); 13 17 editor.addCommand( 'unlink', new CKEDITOR.unlinkCommand() ); 14 18 editor.ui.addButton( 'Link', 15 19 { … … 117 121 selection.selectRanges( ranges ); 118 122 editor.document.$.execCommand( 'unlink', false, null ); 119 123 selection.selectBookmarks( bookmarks ); 120 } 124 }, 125 activeInModes : [ 'wysiwyg' ] 121 126 }; 122 127 123 128 CKEDITOR.tools.extend( CKEDITOR.config, -
_source/plugins/list/plugin.js
503 503 CKEDITOR.dom.element.clearAllMarkers( database ); 504 504 selection.selectBookmarks( bookmarks ); 505 505 editor.focus(); 506 } 506 }, 507 activeInModes : [ 'wysiwyg' ] 507 508 }; 508 509 509 510 CKEDITOR.plugins.add( 'list', -
_source/plugins/pagebreak/plugin.js
79 79 range.splitBlock( 'p' ); 80 80 range.insertNode( breakObject ); 81 81 } 82 } 82 }, 83 activeInModes : [ 'wysiwyg' ] 83 84 }; -
_source/plugins/pastefromword/plugin.js
7 7 { 8 8 init : function( editor ) 9 9 { 10 var commandDefinition = 11 { 12 activeInModes : [ 'wysiwyg' ] 13 } 10 14 // Register the command. 11 editor.addCommand( 'pastefromword', new CKEDITOR.dialogCommand( 'pastefromword' ) );15 editor.addCommand( 'pastefromword', new CKEDITOR.dialogCommand( 'pastefromword', commandDefinition ) ); 12 16 13 17 // Register the toolbar button. 14 18 editor.ui.addButton( 'PasteFromWord', -
_source/plugins/pastetext/plugin.js
25 25 text = clipboardData.getData( 'Text' ); 26 26 27 27 editor.insertText( text ); 28 } 28 }, 29 activeInModes : [ 'wysiwyg' ] 29 30 }; 30 31 31 32 // Register the plugin. -
_source/plugins/print/plugin.js
39 39 editor.window.$.print(); 40 40 else 41 41 editor.document.$.execCommand( "Print" ); 42 } 42 }, 43 activeInModes : [ 'wysiwyg' ] 43 44 }; -
_source/plugins/removeformat/plugin.js
108 108 } 109 109 110 110 editor.getSelection().selectRanges( ranges ); 111 } 111 }, 112 activeInModes : [ 'wysiwyg' ] 112 113 } 113 114 } 114 115 }; -
_source/plugins/showblocks/plugin.js
96 96 97 97 this.toggleState(); 98 98 editor._.showBlocks = !isOn; 99 } 99 }, 100 activeInModes : [ 'wysiwyg' ] 100 101 }; 101 102 102 103 CKEDITOR.plugins.add( 'showblocks', -
_source/plugins/smiley/plugin.js
9 9 10 10 init : function( editor, pluginPath ) 11 11 { 12 editor.addCommand( 'smiley', new CKEDITOR.dialogCommand( 'smiley' ) ); 12 var commandDefinition = 13 { 14 activeInModes : [ 'wysiwyg' ] 15 } 16 editor.addCommand( 'smiley', new CKEDITOR.dialogCommand( 'smiley', commandDefinition ) ); 13 17 editor.ui.addButton( 'Smiley', 14 18 { 15 19 label : editor.lang.smiley.toolbar, -
_source/plugins/specialchar/plugin.js
17 17 CKEDITOR.dialog.add( pluginName, this.path + 'dialogs/specialchar.js' ); 18 18 19 19 // Register the command. 20 editor.addCommand( pluginName, new CKEDITOR.dialogCommand( pluginName ) ); 20 var commandDefinition = 21 { 22 activeInModes : 'wysiwyg' 23 } 24 editor.addCommand( pluginName, new CKEDITOR.dialogCommand( pluginName, commandDefinition ) ); 21 25 22 26 // Register the toolbar button. 23 27 editor.ui.addButton( 'SpecialChar', -
_source/plugins/styles/plugin.js
770 770 CKEDITOR.styleCommand = function( style ) 771 771 { 772 772 this.style = style; 773 this.activeInModes = [ 'wysiwyg' ]; 773 774 }; 774 775 775 776 CKEDITOR.styleCommand.prototype.exec = function( editor ) -
_source/plugins/table/plugin.js
8 8 init : function( editor ) 9 9 { 10 10 var table = CKEDITOR.plugins.table; 11 12 editor.addCommand( 'table', new CKEDITOR.dialogCommand( 'table' ) ); 11 var commandDefinition = 12 { 13 activeInModes : [ 'wysiwyg' ] 14 } 15 editor.addCommand( 'table', new CKEDITOR.dialogCommand( 'table', commandDefinition ) ); 13 16 editor.addCommand( 'tableProperties', new CKEDITOR.dialogCommand( 'tableProperties' ) ); 14 17 editor.ui.addButton( 'Table', 15 18 { -
_source/plugins/templates/plugin.js
12 12 init : function( editor ) 13 13 { 14 14 CKEDITOR.dialog.add( 'templates', CKEDITOR.getUrl( this.path + 'dialogs/templates.js' ) ); 15 16 var commandDefinition = 17 { 18 activeInModes : [ 'wysiwyg' ] 19 } 20 editor.addCommand( 'templates', new CKEDITOR.dialogCommand( 'templates', commandDefinition ) ); 15 21 16 editor.addCommand( 'templates', new CKEDITOR.dialogCommand( 'templates' ) );17 18 22 editor.ui.addButton( 'Templates', 19 23 { 20 24 label : editor.lang.templates.button, -
_source/plugins/toolbar/plugin.js
207 207 [ 208 208 [ 209 209 'Source', '-', 210 'NewPage', 'Preview', 'Templates', 'Print', ' -',210 'NewPage', 'Preview', 'Templates', 'Print', 'SpellChecker','-', 211 211 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 212 212 'Undo', 'Redo', '-', 213 213 'Find', 'Replace', '-',