Rich text / API

foldkit-richtext-dom/toolbar

The marks toolbar (§35, §119): a button per mark, dispatching the same Messages a chord does. It is the application's chrome, not the editor's — §29 gives the editor the contenteditable subtree and the application everything around it — so this renders a value the application places beside the editor's host, and it never touches the DOM the editor owns. A Mixins slot family wraps these buttons when an application needs to restyle or replace parts.

Functions

markActiveA mark is active when the caret carries it, or — with no stored format — when every run the selection covers does (§119). Exported because a Mixins slot…
marksToolbarButtons for the editor's marks. The application decides where they go.

Values

blockAnchoranchorToBlock as a Mount, for the element a block handle is drawn in. Key that element by node.
blockDragdragBlock as a Mount, for a block handle's grip; its drop is the editor's MovedBlock.
selectionAnchoranchorToSelection as a Mount, for the element a floating toolbar is drawn in.

Interfaces

ToolbarOptions
ToolbarStateThe editor state a toolbar reads: what a Bundle projects, without the rest.