Skip to content

Type Editor


Type Editor / @type-editor/history / commands/undo

commands/undo

Variables

VariableDescription

undo

A command function that undoes the last change, if any.

This command will undo the most recent change in the editor's history and automatically scroll the selection into view after the undo operation.

Example

typescript
// In a keymap
keymap({
  "Mod-z": undo,
});