Rich text / API

foldkit-richtext-dom/events

Browser events as editor intent (§§30–31). The adapter owns the subtree, so every event it understands is preventDefaulted: the browser must not mutate the DOM behind the semantic document. An event the adapter does not understand is left alone (the caller lets it through), and one it understands but cannot yet honor is prevented without a command — a deliberate no-op rather than a silent DOM divergence.

Functions

attachWires the owned subtree to an application. The adapter never decides what an edit means: it translates events into commands, hands them to onIntent, and…
intentForReads one event as intent. composing tells the adapter that an IME owns the interaction: the browser must keep its temporary text, so composition input is…
readSelection
restoreSelectionPuts the browser selection back where the semantic state says it is. Direction is preserved through setBaseAndExtent when the environment has it; jsdom and…

Values

SLICE_CLIPBOARD_TYPEThe clipboard type a Foldkit RichText slice travels under.

Interfaces

Attachment
AttachOptions
Intent
KeyBindingOne chord an application adds to the adapter's table, or overrides in it. Modifiers match exactly and the key matches what the browser reports, so Mod-b…

Types

DecorateWhat is drawn over a document, derived from it on every render (§129).