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 | |
edited | Wraps one editor Message as the parent Message that carries it. |
editorAt | Places 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… |
focus | Focuses 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 | |
overlay | Draws decorations over the editor at hostId, beside what its placement draws, until the next overlay replaces them: decorations an application derives from… |
patched | |
patchTo | Patches 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… |
placeEditor | Records 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 | |
replaceChangeSet | What 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 | |
EditorState | Interaction state the parent owns beside the document. |
EditorView | What the child reads: the parent's document passes through, never stored. |
editorView | The 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 | |
update | The parent's update: placement Messages route to the editor, others stand still. |
Interfaces
EditorPlacement | What 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
OutMessage | The committed edit, or the diagnostic that refused it. |