This object maintains the undo stack for an EditSession.

Constructors

    • new UndoManager()

Resets the current undo state and creates a new UndoManager.

Resets the current undo state and creates a new UndoManager.

Methods

    • UndoManager.execute(Object options)

Provides a means for implementing your own undo manager. options has one property, args, an Array, with two elements:

Provides a means for implementing your own undo manager. options has one property, args, an Array, with two elements:

  • args[0] is an array of deltas
  • args[1] is the document to associate with

Arguments

optionsObject

Required. Contains additional properties

Returns true if there are redo operations left to perform.

Returns true if there are redo operations left to perform.

Returns true if there are undo operations left to perform.

Returns true if there are undo operations left to perform.

    • UndoManager.redo(Boolean dontSelect)

Perform a redo operation on the document, reimplementing the last change.

Perform a redo operation on the document, reimplementing the last change.

Arguments

dontSelectBoolean

Required. If true, doesn't select the range of where the change occured

    • UndoManager.reset()

Destroys the stack of undo and redo redo operations.

Destroys the stack of undo and redo redo operations.

Perform an undo operation on the document, reverting the last change.

Perform an undo operation on the document, reverting the last change.

Arguments

dontSelectBoolean

Required. If true, doesn't select the range of where the change occured