Ticket #2836: 2836_3.patch
File 2836_3.patch, 15.8 KB (added by , 16 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
2220 2220 * // Register the "link" command, which opens the "link" dialog. 2221 2221 * editor.addCommand( 'link', <b>new CKEDITOR.dialogCommand( 'link' )</b> ); 2222 2222 */ 2223 CKEDITOR.dialogCommand = function( dialogName )2223 CKEDITOR.dialogCommand = function( dialogName, commandDefinition ) 2224 2224 { 2225 2225 this.dialogName = dialogName; 2226 CKEDITOR.tools.extend( this, commandDefinition ); 2226 2227 }; 2227 2228 2228 2229 CKEDITOR.dialogCommand.prototype = -
_source/plugins/editingblock/plugin.js
168 168 }); 169 169 } 170 170 171 // Enable and disable commands. 172 for ( item in this._.commands ) 173 { 174 var command = this._.commands[ item ]; 175 176 if ( command.activeInModes ) 177 { 178 var index = CKEDITOR.tools.indexOf( command.activeInModes, mode ), 179 state = ( index == -1 ) ? CKEDITOR.TRISTATE_DISABLED : CKEDITOR.TRISTATE_OFF; 180 181 if ( command.state != state ) 182 { 183 command.state = state; 184 command.fire( 'state' ); 185 } 186 } 187 } 188 171 189 modeEditor.load( holderElement, ( typeof data ) != 'string' ? this.getData() : data); 172 190 }; 173 191 -
_source/plugins/find/plugin.js
7 7 { 8 8 init : function( editor ) 9 9 { 10 var commandDefinition = 11 { 12 activeInModes : [ 'wysiwyg' ] 13 } 10 14 var forms = CKEDITOR.plugins.find; 11 15 editor.ui.addButton( 'Find', 12 16 { 13 17 label : editor.lang.findAndReplace.find, 14 18 command : 'find' 15 19 }); 16 editor.addCommand( 'find', new CKEDITOR.dialogCommand( 'find' ) );20 editor.addCommand( 'find', new CKEDITOR.dialogCommand( 'find', commandDefinition ) ); 17 21 18 22 editor.ui.addButton( 'Replace', 19 23 { 20 24 label : editor.lang.findAndReplace.replace, 21 25 command : 'replace' 22 26 }); 23 editor.addCommand( 'replace', new CKEDITOR.dialogCommand( 'replace' ) );27 editor.addCommand( 'replace', new CKEDITOR.dialogCommand( 'replace', commandDefinition ) ); 24 28 25 29 CKEDITOR.dialog.add( 'find', this.path + 'dialogs/find.js' ); 26 30 CKEDITOR.dialog.add( 'replace', this.path + 'dialogs/find.js' ); -
_source/plugins/flash/plugin.js
18 18 return length; 19 19 } 20 20 21 editor.addCommand( 'flash', new CKEDITOR.dialogCommand( 'flash' ) ); 21 var commandDefinition = 22 { 23 activeInModes : [ 'wysiwyg' ] 24 } 25 26 editor.addCommand( 'flash', new CKEDITOR.dialogCommand( 'flash', commandDefinition ) ); 22 27 editor.ui.addButton( 'Flash', 23 28 { 24 29 label : editor.lang.common.flash, -
_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[ buttonName.charAt(0).toLowerCase() + buttonName.slice(1) ], -
_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/selection/plugin.js
74 74 editor.document.$.execCommand( 'SelectAll', false, null ); 75 75 break; 76 76 case 'source' : 77 // TODO 77 // TODOz 78 78 } 79 79 } 80 80 }; -
_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
848 848 CKEDITOR.styleCommand = function( style ) 849 849 { 850 850 this.style = style; 851 this.activeInModes = [ 'wysiwyg' ]; 851 852 }; 852 853 853 854 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/undo/plugin.js
81 81 if ( undoManager.index == -1 ) 82 82 undoManager.save(); 83 83 } 84 else if ( undoManager.enabled && editor.mode == 'source' ) 85 undoManager.enabled = false; 84 86 85 87 undoManager.onChange(); 86 88 }); -
_source/plugins/wsc/plugin.js
13 13 init : function( editor, pluginPath ) 14 14 { 15 15 var commandName = 'checkspell'; 16 var commandDefinition = 17 { 18 activeInModes : [ 'wysiwyg' ] 19 } 16 20 17 var command = editor.addCommand( commandName, new CKEDITOR.dialogCommand( commandName ) );21 var command = editor.addCommand( commandName, new CKEDITOR.dialogCommand( commandName, commandDefinition ) ); 18 22 19 23 // SpellChecker doesn't work in Opera. 20 24 if ( CKEDITOR.env.opera )