This object maintains the undo stack for an [[EditSession EditSession]].

Constructors

Properties

hasRedo: (() => boolean)

Type declaration

    • (): boolean
    • Returns boolean

hasUndo: (() => boolean)

Type declaration

    • (): boolean
    • Returns boolean

isClean: (() => boolean)

Type declaration

    • (): boolean
    • Returns boolean

lastDeltas: any[]
mark: number
markClean: ((rev?) => void)

Type declaration

    • (rev?): void
    • Parameters

      • Optional rev: number

      Returns void

selections: any[]

Methods

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

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

    Parameters

    Returns void

  • Takes in an object which was returned from the toJSON method above, and resets the current undoManager instance to use the previously exported instance state.

    Parameters

    • json: object

    Returns void

  • Parameters

    • rev: number
    • Optional after: boolean

    Returns {
        rev: number;
        value: string;
    }

    • rev: number
    • value: string
  • [Perform a redo operation on the document, reimplementing the last change.]{: #UndoManager.redo}

    Parameters

    Returns void

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

    Parameters

    Returns void

Generated using TypeDoc