Is there any ways to reset the undo history?
I'm trying to reuse the same editor instance, and i want to reset the undo history so that the end user can't undo past the last time setData() was invoked.
I'm trying to reuse the same editor instance, and i want to reset the undo history so that the end user can't undo past the last time setData() was invoked.

Re: is there a way to reset the undo history?
FCKUndo.resetUndoState = function() { //simple reset of the undo history this.SavedData = new Array() ; this.CurrentIndex = -1 ; this.TypesCount = 0 ; this.Changed = false ; this.MaxTypes = 25 ; this.Typing = false ; this.SaveLocked = false ; FCK.Events.FireEvent( "OnSelectionChange" ) ; // this updates the undo and redo toolbar status }Re: is there a way to reset the undo history?
ResetUndoState : function() { FCKUndo.resetUndoState() ; },You can then call the reset using something like oEditor.ResetUndoState();
I also simplified the function in FCKundo.js
FCKUndo.resetUndoState = function() { //simple reset of the undo history this.SavedData = new Array() ; this.CurrentIndex = -1 ; this.TypesCount = 0 ; this.Changed = false ; this.Typing = false ; this.SaveLocked = false ; }You need to call the FCK.Events.FireEvent( "OnSelectionChange" ) event if you use ResetUndoState inside a plugin. It's not needed if you call it through your instance reference (EG oEditor.ResetUndoState())
Anyways .. I post this in case anyone ever needs it in the future