Skip to main content
Alpha: Document API is currently alpha and subject to breaking changes.

Summary

Query the current undo/redo history state of the active editor.
  • Operation ID: history.get
  • API member path: editor.doc.history.get(...)
  • Mutates document: no
  • Idempotency: idempotent
  • Supports tracked mode: no
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a HistoryState object with undoDepth, redoDepth, canUndo, canRedo, and a list of history-unsafe operations.

Input fields

No fields.

Example request

Output fields

Example response

Pre-apply throws

  • None

Non-applied failure codes

  • None

Raw schemas