Changeset 5163


Ignore:
Timestamp:
02/20/10 23:52:15 (5 years ago)
Author:
fredck
Message:

#5191, #5208: Reverting [5015] as it's breaking the undo behavior.

Location:
CKEditor/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CKEditor/trunk/CHANGES.html

    r5144 r5163  
    8080                <li><a href="http://dev.fckeditor.net/ticket/4951">#4951</a> : Replacing patterns into empty string throws errors.</li>
    8181                <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>
    8382                <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>
    8483                <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  
    584584                 * @param {Function} callback Function to be called after the setData
    585585                 *              is completed.
    586                  * @param {Boolean} noUndo Indicates that the function call must not
    587                  *              create and undo snapshot.
    588586                 * @example
    589587                 * CKEDITOR.instances.editor1.<b>setData</b>( '&lt;p&gt;This is the editor data.&lt;/p&gt;' );
     
    594592                 *     });
    595593                 */
    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 )
    601599                                {
    602600                                        evt.removeListener();
    603                                         callback && callback.call( evt.editor );
    604                                         noUndo !== false && this.fire( 'saveSnapshot' );
    605                                 });
     601                                        callback.call( evt.editor );
     602                                } );
     603                        }
    606604
    607605                        // Fire "setData" so data manipulation may happen.
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2015 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy