Changeset 502


Ignore:
Timestamp:
07/23/07 12:41:05 (7 years ago)
Author:
martinkou
Message:

Fixed #192 : Some FCKeditor JavaScript API functions that change the document do not save undo snapshots.

Location:
FCKeditor/trunk/editor/_source/internals
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/internals/fck_gecko.js

    r480 r502  
    181181        html = html.replace( FCKRegexLib.EmOpener, '<i$1' ) ; 
    182182        html = html.replace( FCKRegexLib.EmCloser, '<\/i>' ) ; 
     183         
     184        // Save an undo snapshot first. 
     185        FCKUndo.SaveUndoStep() ; 
    183186 
    184187        // Delete the actual selection. 
     
    202205 
    203206        this.Focus() ; 
     207 
     208        // For some strange reason the SaveUndoStep() call doesn't activate the undo button at the first InsertHtml() call. 
     209        this.Events.FireEvent( "OnSelectionChange" ) ; 
    204210} 
    205211 
  • FCKeditor/trunk/editor/_source/internals/fck_ie.js

    r480 r502  
    153153 
    154154        FCKDocumentProcessor.Process( FCK.EditorDocument ) ; 
     155 
     156        // For some strange reason the SaveUndoStep() call doesn't activate the undo button at the first InsertHtml() call. 
     157        this.Events.FireEvent( "OnSelectionChange" ) ; 
    155158} 
    156159 
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy