Ticket #2763: 2763_5.patch
File 2763_5.patch, 7.1 KB (added by , 14 years ago) |
---|
-
_source/core/command.js
9 9 10 10 this.exec = function() 11 11 { 12 commandDefinition.exec.call( this, editor ); 12 if ( this.state == CKEDITOR.TRISTATE_DISABLED ) 13 return false; 14 15 return ( commandDefinition.exec.call( this, editor ) !== false ); 13 16 }; 14 17 15 18 CKEDITOR.tools.extend( this, commandDefinition ); -
_source/core/commanddefinition.js
24 24 * @function 25 25 * @param {CKEDITOR.editor} editor The editor within which run the command. 26 26 * @param {Object} [data] Additional data to be used to execute the command. 27 * @returns {Boolean} Whether the command has been successfully executed. 28 * Defaults to "true", if nothing is returned. 27 29 * @example 28 30 * editorInstance.addCommand( 'sample', 29 31 * { … … 33 35 * } 34 36 * }); 35 37 */ 38 39 /** 40 * Whether the command need to be hooked into the redo/undo system. 41 * @name CKEDITOR.commandDefinition.canUndo 42 * @type {Boolean} If not defined or 'true' both hook into undo system, set it 43 * to 'false' explicitly keep it out. 44 * @field 45 * @example 46 * editorInstance.addCommand( 'alertName', 47 * { 48 * exec : function( editor ) 49 * { 50 * alert( editor.name ); 51 * }, 52 * canUndo : false // No support for undo/redo 53 * }); 54 */ -
_source/core/config.js
146 146 * @example 147 147 * config.plugins = 'basicstyles,button,htmldataprocessor,toolbar,wysiwygarea'; 148 148 */ 149 plugins : 'basicstyles,button,elementspath,horizontalrule,htmldataprocessor,keystrokes,newpage,pagebreak,preview,removeformat,smiley,indent,link,list,sourcearea,table,specialchar,tab,toolbar,undo,wysiwygarea', 149 150 150 plugins : 'basicstyles,button,elementspath,horizontalrule,htmldataprocessor,keystrokes,newpage,pagebreak,preview,removeformat,smiley,indent,link,list,sourcearea,table,specialchar,tab,toolbar,wysiwygarea',151 152 151 /** 153 152 * The theme to be used to build the UI. 154 153 * @type String -
_source/core/editor.js
346 346 */ 347 347 addCommand : function( commandName, commandDefinition ) 348 348 { 349 this._.commands[ commandName ] = new CKEDITOR.command( this, commandDefinition );349 return this._.commands[ commandName ] = new CKEDITOR.command( this, commandDefinition ); 350 350 }, 351 351 352 352 addCss : function( css ) … … 386 386 execCommand : function( commandName, data ) 387 387 { 388 388 var command = this.getCommand( commandName ); 389 390 var eventData = 391 { 392 name: commandName, 393 commandData: data, 394 command: command 395 }; 396 389 397 if ( command && command.state != CKEDITOR.TRISTATE_DISABLED ) 390 return command.exec( this, data ); 398 { 399 if ( this.fire( 'beforeCommandExec', eventData ) !== false ) 400 { 401 eventData.returnValue = command.exec( this, eventData.commandData ); 391 402 403 if ( this.fire( 'afterCommandExec', eventData ) !== false ) 404 return eventData.returnValue; 405 } 406 } 407 392 408 // throw 'Unknown command name "' + commandName + '"'; 393 409 return false; 394 410 }, … … 454 470 return data; 455 471 }, 456 472 473 loadSnapshot : function( snapshot ) 474 { 475 this.fire( 'loadSnapshot', snapshot ); 476 }, 477 457 478 /** 458 479 * Sets the editor data. The data must be provided in raw format. 459 480 * @param {String} data HTML code to replace the curent content in the editor. -
_source/core/tools.js
15 15 */ 16 16 CKEDITOR.tools = 17 17 { 18 arrayCompare : function( arrayA, arrayB ) 19 { 20 if ( !arrayA && !arrayB ) 21 return true; 22 23 if ( !arrayA || !arrayB || arrayA.length != arrayB.length ) 24 return false; 25 26 for ( var i = 0 ; i < arrayA.length ; i++ ) 27 { 28 if ( arrayA[ i ] != arrayB[ i ] ) 29 return false; 30 } 31 32 return true; 33 }, 34 18 35 /** 19 36 * Copy the properties from one object to another. By default, properties 20 37 * already present in the target object <strong>are not</strong> overwritten. -
_source/lang/en.js
43 43 horizontalrule : 'Insert Horizontal Line', 44 44 pagebreak : 'Insert Page Break', 45 45 unlink : 'Unlink', 46 undo : 'Undo', 47 redo : 'Redo', 46 48 47 49 // Common messages and labels. 48 50 common : -
_source/plugins/editingblock/plugin.js
70 70 if ( editor.mode ) 71 71 event.data = getMode( editor ).getSnapshotData(); 72 72 }); 73 74 editor.on( 'loadSnapshot', function( event ) 75 { 76 if ( editor.mode ) 77 getMode( editor ).loadSnapshotData( event.data ); 78 }); 73 79 } 74 80 }); 75 81 -
_source/plugins/selection/plugin.js
633 633 return retval; 634 634 }, 635 635 636 createBookmarks2 : function() 637 { 638 var bookmarks = [], 639 ranges = this.getRanges(); 640 641 for ( var i = 0 ; i < ranges.length ; i++ ) 642 bookmarks.push( ranges[i].createBookmark2() ); 643 644 return bookmarks; 645 }, 646 636 647 selectBookmarks : function( bookmarks ) 637 648 { 638 649 var ranges = []; -
_source/plugins/toolbar/plugin.js
212 212 'NumberedList', 'BulletedList', '-', 213 213 'Outdent', 'Indent', '-', 214 214 'Subscript', 'Superscript', '-', 215 'Undo', 'Redo', '-', 215 216 'SelectAll', 'RemoveFormat', '-', 216 217 'Link', 'Unlink', 'Anchor', '-', 217 218 'Table', 'Smiley', 'HorizontalRule', 'SpecialChar', 'PageBreak' -
_source/skins/default/toolbar.css
310 310 { 311 311 background-position: 0 -880px; 312 312 } 313 313 .cke_skin_default a.cke_button_undo .cke_icon 314 { 315 background-position: 0 -208px; 316 } 317 .cke_skin_default a.cke_button_redo .cke_icon 318 { 319 background-position: 0 -224px; 320 } 314 321 .cke_skin_default a.cke_button_numberedlist .cke_icon 315 322 { 316 323 background-position: 0 -400px;