Ticket #4445: 4445_2.patch
File 4445_2.patch, 3.5 KB (added by , 14 years ago) |
---|
-
_source/plugins/wysiwygarea/plugin.js
466 466 editor.focus(); 467 467 isPendingFocus = false; 468 468 } 469 setTimeout( function() 470 { 471 editor.fire( 'dataReady' ); 472 }, 0 ); 469 473 470 474 /* 471 475 * IE BUG: IE might have rendered the iframe with invisible contents. -
_source/plugins/sourcearea/plugin.js
1 ?/*1 /* 2 2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 3 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 4 */ … … 123 123 loadData : function( data ) 124 124 { 125 125 textarea.setValue( data ); 126 editor.fire( 'dataReady' ); 126 127 }, 127 128 128 129 getData : function() -
_source/plugins/newpage/plugin.js
19 19 exec : function( editor ) 20 20 { 21 21 var command = this; 22 function afterCommand()22 editor.setData( editor.config.newpage_html, function() 23 23 { 24 // Defer to happen after 'selectionChange'. 25 setTimeout( function() 26 { 27 editor.fire( 'afterCommandExec', 28 { 29 name: command.name, 30 command: command 31 } ); 32 }, 500 ); 33 } 34 if ( editor.mode == 'wysiwyg') 35 editor.on( 'contentDom', function( evt ){ 36 37 evt.removeListener(); 38 afterCommand(); 39 } ); 40 41 editor.setData( editor.config.newpage_html ); 24 editor.fire( 'afterCommandExec', 25 { 26 name: command.name, 27 command: command 28 } ); 29 } ); 42 30 editor.focus(); 43 44 if( editor.mode == 'source' )45 afterCommand();46 47 31 }, 48 32 async : true 49 33 }); -
_source/core/editor.js
1 ?/*1 /* 2 2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 3 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 4 */ … … 567 567 /** 568 568 * Sets the editor data. The data must be provided in raw format. 569 569 * @param {String} data HTML code to replace the curent content in the editor. 570 * @param {Function} callback Function to be called after the setData is completed. 570 571 * @example 571 572 * CKEDITOR.instances.editor1.<b>setData( '<p>This is the editor data.</p>' )</b>; 573 * CKEDITOR.instances.editor1.setData( '<p>Some other editor data.</p>', function() 574 * { 575 * CKEDITOR.instances.editor1.checkDirty(); // true 576 * } ); 572 577 */ 573 setData : function( data )578 setData : function( data , callback ) 574 579 { 580 this.on( 'dataReady', function( evt ) 581 { 582 evt.removeListener(); 583 callback(); 584 } ); 585 575 586 // Fire "setData" so data manipulation may happen. 576 587 var eventData = { dataValue : data }; 577 588 this.fire( 'setData', eventData );