Ritext
Extensions

History

Undo and redo editor changes.

The History extension adds Undo and Redo buttons to the toolbar. The buttons are automatically disabled when there is nothing to undo or redo.

Import

import { History } from 'ritext/extension/history';

Usage

const extensions = [History];

Features

  • Undo button (disabled when no history)
  • Redo button (disabled when no redo stack)
  • Uses useEditorState to reactively update button state

Options

Prop

Type

Keyboard Shortcuts

ActionWindows / LinuxmacOS
UndoCtrl+Z⌘+Z
RedoCtrl+Y or Ctrl+Shift+Z⌘+Shift+Z

On this page