Changeset 5163
- Timestamp:
- 02/20/10 23:52:15 (3 years ago)
- Location:
- CKEditor/trunk
- Files:
-
- 2 edited
-
CHANGES.html (modified) (1 diff)
-
_source/core/editor.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/CHANGES.html
r5144 r5163 80 80 <li><a href="http://dev.fckeditor.net/ticket/4951">#4951</a> : Replacing patterns into empty string throws errors.</li> 81 81 <li><a href="http://dev.fckeditor.net/ticket/4963">#4963</a> : Link dialog doesn't open properly for e-mail type links.</li> 82 <li><a href="http://dev.fckeditor.net/ticket/4999">#4999</a> : Adding undo snapshot for editor::setData.</li>83 82 <li><a href="http://dev.fckeditor.net/ticket/5043">#5043</a> : Removed the possibility of having an unwanted script tag being outputted with the editor contents.</li> 84 83 <li><a href="http://dev.fckeditor.net/ticket/3678">#3678</a> : There were issues when editing links inside floating divs with IE.</li> -
CKEditor/trunk/_source/core/editor.js
r5156 r5163 584 584 * @param {Function} callback Function to be called after the setData 585 585 * is completed. 586 * @param {Boolean} noUndo Indicates that the function call must not587 * create and undo snapshot.588 586 * @example 589 587 * CKEDITOR.instances.editor1.<b>setData</b>( '<p>This is the editor data.</p>' ); … … 594 592 * }); 595 593 */ 596 setData : function( data , callback , noUndo)597 { 598 noUndo !== false && this.fire( 'saveSnapshot' );599 600 this.on( 'dataReady', function( evt )594 setData : function( data , callback ) 595 { 596 if( callback ) 597 { 598 this.on( 'dataReady', function( evt ) 601 599 { 602 600 evt.removeListener(); 603 callback && callback.call( evt.editor );604 noUndo !== false && this.fire( 'saveSnapshot');605 });601 callback.call( evt.editor ); 602 } ); 603 } 606 604 607 605 // Fire "setData" so data manipulation may happen.
Note: See TracChangeset
for help on using the changeset viewer.
