Opened 15 years ago

Closed 15 years ago

#2702 closed New Feature (fixed)

reset undo history

Reported by: Cean Perkins Owned by:
Priority: Normal Milestone:
Component: Core : Undo & Redo Version:
Keywords: Confirmed Cc:

Description

a Simple function to reset the undo history so that you can reuse an editor window with out having to reload in order to clear the current undo/redo history.

The function is very simple .. just resets the undo vars

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 ;
   FCK.Events.FireEvent( "OnSelectionChange" ) ; // this updates the undo and redo toolbar status
}

Attachments (3)

fckundo.js (6.1 KB) - added by Cean Perkins 15 years ago.
fckundo.js
fckxhtml_ie.js (6.5 KB) - added by Cean Perkins 15 years ago.
fck.js
fck.js (33.2 KB) - added by Cean Perkins 15 years ago.
fck.js

Download all attachments as: .zip

Change History (8)

comment:1 Changed 15 years ago by Cean Perkins

To make this actually really useful ... changes to both fck.js and fckundo.js need to be made:

fck.js

	ResetUndoState : function()
	{
		FCKUndo.resetUndoState() ;
	},

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 ;
}

The function can then be called through the editor instance EG oEditor.ResetUndoState();

or inside plugins EG: FCKUndo.resetUndoState(); FCK.Events.FireEvent("OnSelectionChange");

Changed 15 years ago by Cean Perkins

Attachment: fckundo.js added

fckundo.js

Changed 15 years ago by Cean Perkins

Attachment: fckxhtml_ie.js added

fck.js

Changed 15 years ago by Cean Perkins

Attachment: fck.js added

fck.js

comment:2 Changed 15 years ago by Martin Kou

Keywords: undo history reset removed
Milestone: FCKeditor 2.6.4

Thanks for the suggestion. But 2.6.4 is going to be released soon so we're not accepting feature requests for it right now.

comment:3 Changed 15 years ago by Artur Formella

Keywords: Confirmed added

comment:4 Changed 15 years ago by Artur Formella

Already fixed in V3: #3662

comment:5 Changed 15 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: newclosed

We'll keep this as a V3 only feature.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy