Rich text / API

foldkit-richtext-dom/editor-bundle

The controlled-editor feasibility harness (§27): the authoritative Document lives in the parent Model, the editor Bundle reads it through its Link, and a single parent transition commits both the document and the interaction state.

No DOM, no persistence, no collaboration: this exists to answer whether Bundle ownership can hold a rich-text editor without a second synchronized document copy or a Command that commits half the transition.

Functions

applied
changedProps
cleared
converted
deleted
editedWraps one editor Message as the parent Message that carries it.
editorAtPlaces one editor, bound to the host element the view renders and the patch Command finds. Each placement picks its own id and names what it places; one…
focusFocuses the editor at hostId with selection in the browser, brought into view: for a control outside the editor that sends the reader into the text, such as…
inserted
lifted
moved
overlayDraws decorations over the editor at hostId, beside what its placement draws, until the next overlay replaces them: decorations an application derives from…
patched
patchToPatches the editor at hostId to next, a document the parent put in place of previous, keeping the host element instead of mounting a new one. A parent that…
placeEditorRecords everything a placement names for its host id, replacing what the id had: one call, so a placement cannot half-apply. editorAt and the form control…
pressed
redone
replaceChangeSetWhat differs between two whole documents, for a patch from one to the other, in a transaction's terms: the runs whose text or marks changed and the blocks…
retyped
selected
toggled
typed
undone
wrapped

Values

application
Editor
editor
EditorStateInteraction state the parent owns beside the document.
EditorViewWhat the child reads: the parent's document passes through, never stored.
editorViewThe host element the editor mounts into, and whose id the patch Command finds (§118). It is a custom element so hydration leaves what is inside it alone…
Model
ParentMessage
updateThe parent's update: placement Messages route to the editor, others stand still.

Interfaces

EditorPlacementWhat a placement gives its editor. Each is placed by host id rather than passed as an arg (§122): each holds functions or schemas, which a schema-decoded…

Types

OutMessageThe committed edit, or the diagnostic that refused it.