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)
      • Void

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

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

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

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

   

Arguments

optionsObjectRequired. 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)
      • Void

[Perform a redo operation on the document, reimplementing the last change.]{: #UndoManager.redo}

[Perform a redo operation on the document, reimplementing the last change.]{: #UndoManager.redo}

   

Arguments

dontSelectBooleanRequired. {:dontSelect}
    • UndoManager.reset()
      • Void

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. Returns the range of the undo.]{: #UndoManager.undo}

[Perform an undo operation on the document, reverting the last change. Returns the range of the undo.]{: #UndoManager.undo}

   

Arguments

dontSelectBooleanRequired. {:dontSelect}