0.13.4-next.12 • Published 30 days ago
@emailsenderlab/history v0.13.4-next.12
@lexical/history
This package contains history helpers for Lexical.
Methods
registerHistory
Registers necessary listeners to manage undo/redo history stack and related editor commands. It returns unregister
callback that cleans up all listeners and should be called on editor unmount.
function registerHistory(
editor: LexicalEditor,
externalHistoryState: HistoryState,
delay: number,
): () => void
Commands
History package handles UNDO_COMMAND
, REDO_COMMAND
and CLEAR_HISTORY_COMMAND
commands. It also triggers CAN_UNDO_COMMAND
and CAN_REDO_COMMAND
commands when history state is changed. These commands could be used to work with history state:
import {UNDO_COMMAND, REDO_COMMAND} from '@emailsenderlab/lexical';
<Toolbar>
<Button onClick={() => editor.dispatchCommand(UNDO_COMMAND)}>Undo</Button>
<Button onClick={() => editor.dispatchCommand(REDO_COMMAND)}>Redo</Button>
</Toolbar>;
0.13.4-next.12
30 days ago
0.13.4-next.11
1 month ago
0.13.4-next.10
2 months ago
0.13.4-next.9
2 months ago
0.13.4-next.8
2 months ago
0.13.4-next.5
2 months ago
0.13.4-next.7
2 months ago
0.13.4-next.6
2 months ago
0.13.4-next.4
3 months ago
0.13.4-next.1
3 months ago
0.13.4-next.0
3 months ago
0.13.4-next.3
3 months ago
0.13.4-next.2
3 months ago
0.13.3
3 months ago
0.13.2-next.1
3 months ago
0.13.2-next.0
3 months ago
0.0.4-next.0
6 months ago
0.12.3-next.0
6 months ago