R
I

EditorContextValue

tested

Everything child components and the input/selection plumbing need.

Signature

ts
interface EditorContextValue

Properties

PropertyTypeDescription
editorEditorThe headless controller.
stateShallowRef<EditorState>Reactive mirror of `editor.state`, replaced wholesale per transaction.
registryRegistry
configEditorConfig
contentRootShallowRef<HTMLElement | null>The single contenteditable root element (set by EditorContent).
blockElementsBlockElementRegistryBlock id → its (non-editable) block-content element.
selectionSelectionBridgeDOM ↔ model selection mapping.
composingRef<boolean, boolean>True while an IME composition is in flight (suppresses model sync).
lastOriginRef<string | undefined, string | undefined>Origin (`meta('origin')`) of the most recent transaction, if any.
dispatchDispatch
exec(command: Command) => booleanRun a command against the current state.
focusBlock(blockId: string, offset: number | "start" | "end") => voidMove real DOM focus + caret into a block.