Rich text / API

foldkit-richtext-dom/host

The host-element mount (§118): the bridge between a Foldkit view and the owned subtree. A view renders a host element and mounts the interpreter into it once; a patch Command later finds the attachment through that element, so a DOM reference never has to enter a Model.

Functions

attachmentInThe attachment a host owns, for a patch Command that has only the element.
decorationsForWhat is drawn over a host's document: the placement's decorations, then the overlay. Both are read on each draw, so an overlay set after the editor attached…
inputRulesForThe rules placed for a host id, or none — typing is then only an insertion.
mountIntoRenders content into host and records the attachment. The host is the view's element; the subtree the interpreter creates goes inside it, and the…
placeDecorationsRecords what a placement's editor draws over its document, by host id, for the reason a rendering registry is placed: a function cannot ride in the Bundle's…
placeholdersForThe placeholders placed for a host id; none when nothing was placed.
placeInputRulesRecords the input rules a placement's editor applies to what is typed, by host id, for the same reason a vocabulary is placed: a rule holds a function, so…
placeOverlayRecords decorations an application derives from its own state, such as other people's carets, to draw over a host's document beside what the placement draws.
placePlaceholdersRecords what a placement's editor shows where nothing is written, by host id, beside the rest of how it draws, so the mount reads all of it from the id it…
placeRenderingRecords how a placement's host id renders (§122). A registry holds functions, so it cannot ride in a Bundle's args or Model; it is placed by host id because…
placeServerRenderedRecords how a placement tells a server's render from the browser's, by host id (§145): the host carries the document's markup only while it says the render…
placeSlashEntriesRecords what a placement's slash menu offers, by host id, so the update that resolves Enter reads the same entries the application's menu draws. Absent, it…
placeVocabularyRecords the vocabulary a placement's editor resolves against, by host id, for the same reason a rendering registry is: it holds schemas and functions, so it…
releaseMountDetaches a host's listeners and removes its subtree. Safe to call twice. What a placement recorded is not forgotten here: it belongs to the host id the…
renderingForThe registry placed for a host id, or the default when none was placed.
serverRenderedForWhether this render of a host is the server's; never, when nothing was placed.
slashEntriesForThe entries placed for a host id, or undefined when it offers the editor's own.
vocabularyForThe vocabulary placed for a host id, or none — run then uses its own defaults.

Interfaces

PlaceholdersWhat an editor shows where nothing is written yet.
VocabularyThe vocabulary an editor resolves edits against: the mark and node registries run consults to refuse an edit a declaration forbids (§125). Both are…