I
Editor
testedThe headless editor controller: owns live state, the undo history, and a typed event bus. The Vue layer wraps it; the CRDT adapter subscribes to it.
Signature
ts
interface EditorProperties
| Property | Type | Description |
|---|---|---|
statereadonly | EditorState | — |
dispatch | Dispatch | — |
command | (cmd: Command) => boolean | Run a command against the current state, dispatching if it applies. |
undo | () => boolean | — |
redo | () => boolean | — |
canUndo | () => boolean | — |
canRedo | () => boolean | — |
on | <K extends keyof EditorEvents>(event: K, listener: EditorEvents[K]) => void | — |
off | <K extends keyof EditorEvents>(event: K, listener: EditorEvents[K]) => void | — |
destroy | () => void | — |