I
EditorContextValue
testedEverything child components and the input/selection plumbing need.
Signature
ts
interface EditorContextValueProperties
| Property | Type | Description |
|---|---|---|
editor | Editor | The headless controller. |
state | ShallowRef<EditorState> | Reactive mirror of `editor.state`, replaced wholesale per transaction. |
registry | Registry | — |
config | EditorConfig | — |
contentRoot | ShallowRef<HTMLElement | null> | The single contenteditable root element (set by EditorContent). |
blockElements | BlockElementRegistry | Block id → its (non-editable) block-content element. |
selection | SelectionBridge | DOM ↔ model selection mapping. |
composing | Ref<boolean, boolean> | True while an IME composition is in flight (suppresses model sync). |
lastOrigin | Ref<string | undefined, string | undefined> | Origin (`meta('origin')`) of the most recent transaction, if any. |
dispatch | Dispatch | — |
exec | (command: Command) => boolean | Run a command against the current state. |
focusBlock | (blockId: string, offset: number | "start" | "end") => void | Move real DOM focus + caret into a block. |