Rich text / foldkit-mixins-richtext

MarkToolbarInput

interface · packages/mixins-richtext/src/index.ts:22

interface MarkToolbarInput<Message> {
  readonly state: ToolbarState
  readonly marks?: ReadonlyArray<string> | undefined
  readonly toggled: (mark: string) => Message
}

Members

MarkToolbarInput.state

property · packages/mixins-richtext/src/index.ts:24

readonly state: ToolbarState

What the editor projects: document, selection, and the caret's format.

MarkToolbarInput.marks

property · packages/mixins-richtext/src/index.ts:26

readonly marks?: ReadonlyArray<string> | undefined

The marks to offer, by name. Defaults to the three foldkit-richtext ships.

MarkToolbarInput.toggled

property · packages/mixins-richtext/src/index.ts:32

readonly toggled: (mark: string) => Message

A mark to the Message that toggles it for this caller. The editor's Message.ToggledMark is data, but a caller usually dispatches its wrapper (edited(...)), which is a function — and a plain SlotView holds one.