FormattingToolbarInput.id
property · packages/mixins-richtext/src/formatting.ts:190
readonly id: stringPrefixes the ids the controls draw, which the arrows move focus by; unique on the page.
Rich text / foldkit-mixins-richtext
interface · packages/mixins-richtext/src/formatting.ts:188
interface FormattingToolbarInput<Message> {
readonly id: string
readonly document: RichText.Document
readonly selection: RichText.Selection | null
readonly storedMarks?: ReadonlyArray<string> | null | undefined
readonly wrap: (message: EditorEvent) => Message
readonly items?: ReadonlyArray<FormattingItem<NoInfer<Message>>> | undefined
readonly compact?: boolean | undefined
readonly history?:
| {
readonly undo: boolean
readonly redo: boolean
}
| undefined
readonly menu?: FormattingMenu | undefined
readonly toggled: (menu: FormattingMenu, open: boolean) => NoInfer<Message>
readonly inserts?: ReadonlyArray<InsertEntry<NoInfer<Message>>> | undefined
readonly returned?: NoInfer<Message> | undefined
readonly roving: RovingTabindex.Model
readonly onFocus: (id: string) => NoInfer<Message>
readonly shortcuts?: Readonly<Record<string, string>> | undefined
readonly words?: Partial<FormattingWords> | undefined
readonly direction?: 'ltr' | 'rtl' | undefined
}FormattingToolbarInput.idproperty · packages/mixins-richtext/src/formatting.ts:190
readonly id: stringPrefixes the ids the controls draw, which the arrows move focus by; unique on the page.
FormattingToolbarInput.documentproperty · packages/mixins-richtext/src/formatting.ts:191
readonly document: RichText.DocumentFormattingToolbarInput.selectionproperty · packages/mixins-richtext/src/formatting.ts:192
readonly selection: RichText.Selection | nullFormattingToolbarInput.storedMarksproperty · packages/mixins-richtext/src/formatting.ts:194
readonly storedMarks?: ReadonlyArray<string> | null | undefinedThe caret's pending format, which wins over the run under it (ToolbarState).
FormattingToolbarInput.wrapproperty · packages/mixins-richtext/src/formatting.ts:196
readonly wrap: (message: EditorEvent) => MessageAn editor Message as this caller's, usually its edited(...) wrapper.
FormattingToolbarInput.itemsproperty · packages/mixins-richtext/src/formatting.ts:198
readonly items?: ReadonlyArray<FormattingItem<NoInfer<Message>>> | undefinedThe controls and their order; default standardFormattingItems. Leave a control out to hide it.
FormattingToolbarInput.compactproperty · packages/mixins-richtext/src/formatting.ts:204
readonly compact?: boolean | undefinedDraw only the controls not marked { low }, and the rest in a "More" menu: the application's
answer to a narrow screen, from the width signal it keeps in its Model (a media-query
Subscription, or a Resize mount on the bar's own column). Default false.
FormattingToolbarInput.historyproperty · packages/mixins-richtext/src/formatting.ts:209
readonly history?:
| {
readonly undo: boolean
readonly redo: boolean
}
| undefinedWhether undo and redo apply. The editor cannot know what the application undoes (a page may undo only this tab's own steps), so the caller says. Default: both available.
FormattingToolbarInput.menuproperty · packages/mixins-richtext/src/formatting.ts:211
readonly menu?: FormattingMenu | undefinedThe menu that is open, if any.
FormattingToolbarInput.toggledproperty · packages/mixins-richtext/src/formatting.ts:213
readonly toggled: (menu: FormattingMenu, open: boolean) => NoInfer<Message>What a menu's trigger sends: open (true) or close (false) that menu. Also what Escape sends.
FormattingToolbarInput.insertsproperty · packages/mixins-richtext/src/formatting.ts:219
readonly inserts?: ReadonlyArray<InsertEntry<NoInfer<Message>>> | undefinedWhat the insert menu lists, in order: the slash menu's own entries (InsertEntry.Editor, sent
through wrap, so the two never disagree) and the application's (InsertEntry.App, sent as
they are). Default: the editor's own blocks (group: 'Blocks').
FormattingToolbarInput.returnedproperty · packages/mixins-richtext/src/formatting.ts:225
readonly returned?: NoInfer<Message> | undefinedWhat Escape sends from a control when it closes no popup: usually a Message whose update runs
the editor's focus Command, so Escape returns to the text, as in a conventional toolbar. Without
it Escape does nothing there.
FormattingToolbarInput.rovingproperty · packages/mixins-richtext/src/formatting.ts:227
readonly roving: RovingTabindex.ModelWhere the one tab stop is: the caller's RovingTabindex.Model, as for foldkit-mixins-ui's Toolbar.
FormattingToolbarInput.onFocusproperty · packages/mixins-richtext/src/formatting.ts:229
readonly onFocus: (id: string) => NoInfer<Message>Sent with a control's id when it takes focus, by a key or a press; answer it by storing the id as roving.current.
FormattingToolbarInput.shortcutsproperty · packages/mixins-richtext/src/formatting.ts:231
readonly shortcuts?: Readonly<Record<string, string>> | undefinedPattern (mod+u) by control id (mark-Underline, link) for chords the application's keymap binds.
FormattingToolbarInput.wordsproperty · packages/mixins-richtext/src/formatting.ts:232
readonly words?: Partial<FormattingWords> | undefinedFormattingToolbarInput.directionproperty · packages/mixins-richtext/src/formatting.ts:234
readonly direction?: 'ltr' | 'rtl' | undefinedDefault ltr; rtl swaps ArrowLeft and ArrowRight.