I needed a method for clearing the undo buffer, so I wrote this addition to the JavaScript API, which I think should be added to the main source:
FCK.ClearUndo = function()
{
FCKUndo.SavedData = new Array() ;
FCKUndo.CurrentIndex = -1 ;
FCKUndo.TypesCount = 0 ;
FCKUndo.Typing = false ;
FCK.Events.FireEvent( "OnSelectionChange" ) ;
}
FCK.ClearUndo = function()
{
FCKUndo.SavedData = new Array() ;
FCKUndo.CurrentIndex = -1 ;
FCKUndo.TypesCount = 0 ;
FCKUndo.Typing = false ;
FCK.Events.FireEvent( "OnSelectionChange" ) ;
}