Rich text / foldkit-richtext-dom/toolbar

markActive

function · packages/richtext-dom/src/toolbar.ts:32

function markActive(state: ToolbarState, mark: string): boolean

A 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 view renders its own buttons and needs the same rule.