R
I

Editor

tested

The 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 Editor

Properties

PropertyTypeDescription
statereadonlyEditorState
dispatchDispatch
command(cmd: Command) => booleanRun 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