Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UndoManager

This object maintains the undo stack for an EditSession.

Hierarchy

  • UndoManager

Index

Constructors

constructor

Methods

add

  • 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

bookmark

  • bookmark(rev?: number): void
  • Marks the current status clean

    Parameters

    • Optional rev: number

    Returns void

canRedo

  • canRedo(): boolean
  • Returns true if there are redo operations left to perform.

    Returns boolean

canUndo

  • canUndo(): boolean
  • Returns true if there are undo operations left to perform.

    Returns boolean

isAtBookmark

  • isAtBookmark(): boolean

redo

  • redo(session: EditSession, dontSelect?: boolean): void
  • [Perform a redo operation on the document, reimplementing the last change.]{: #UndoManager.redo}

    Parameters

    Returns void

reset

  • reset(): void

undo

  • undo(session: EditSession, dontSelect?: boolean): void
  • [Perform an undo operation on the document, reverting the last change.]{: #UndoManager.undo}

    Parameters

    Returns void

    The range of the undo.

Generated using TypeDoc