Rich text / foldkit-mixins-richtext

CommandPaletteInput

interface · packages/mixins-richtext/src/palette.ts:26

interface CommandPaletteInput<Message> {
  readonly id: string
  readonly entries: ReadonlyArray<SlashEntry<Message>>
  readonly query: string
  readonly index: number
  readonly changed: (query: string, index: number) => Message
  readonly closed: Message
}

Members

CommandPaletteInput.id

property · packages/mixins-richtext/src/palette.ts:28

readonly id: string

The element id the list and its options are named from; unique on the page.

CommandPaletteInput.entries

property · packages/mixins-richtext/src/palette.ts:30

readonly entries: ReadonlyArray<SlashEntry<Message>>

slashEntries(wrap), and whatever the application adds.

CommandPaletteInput.query

property · packages/mixins-richtext/src/palette.ts:31

readonly query: string

CommandPaletteInput.index

property · packages/mixins-richtext/src/palette.ts:33

readonly index: number

What the palette last highlighted among the matches.

CommandPaletteInput.changed

property · packages/mixins-richtext/src/palette.ts:35

readonly changed: (query: string, index: number) => Message

What the field sends as the query changes or an arrow moves: the next query and index.

CommandPaletteInput.closed

property · packages/mixins-richtext/src/palette.ts:37

readonly closed: Message

What Escape sends.