SlashEntry.id
property · packages/richtext-dom/src/editor.ts:149
readonly id: stringStable id, not the label: how a list keys the entry and moves by it.
Rich text / foldkit-mixins-richtext
interface · packages/richtext-dom/src/editor.ts:147
interface SlashEntry<Payload> {
readonly id: string
readonly label: string
readonly keywords: ReadonlyArray<string>
readonly message: Payload
readonly description?: string | undefined
readonly group?: string | undefined
readonly icon?: string | undefined
}The slash menu's vocabulary (§123, §124 §11): what opens a menu, what it offers, what a query matches, and what a chosen entry sends. An entry carries one of this module's Messages, not a command, so the Bundle resolves Enter by handling the chosen entry as the Message a click would send — which is also what makes a mark entry update the caret's stored marks rather than run a collapsed toggle the command layer treats as a no-op.
Whether a caret is in a query is a read of the document (RichText.textBefore),
not a flag. Nothing here holds state.
SlashEntry.idproperty · packages/richtext-dom/src/editor.ts:149
readonly id: stringStable id, not the label: how a list keys the entry and moves by it.
SlashEntry.labelproperty · packages/richtext-dom/src/editor.ts:151
readonly label: stringWhat the menu shows.
SlashEntry.keywordsproperty · packages/richtext-dom/src/editor.ts:153
readonly keywords: ReadonlyArray<string>Words a query may match besides the label.
SlashEntry.messageproperty · packages/richtext-dom/src/editor.ts:155
readonly message: PayloadWhat choosing this entry sends: an editor Message here, a caller's in a view.
SlashEntry.descriptionproperty · packages/richtext-dom/src/editor.ts:157
readonly description?: string | undefinedA line under the label saying what the entry makes.
SlashEntry.groupproperty · packages/richtext-dom/src/editor.ts:159
readonly group?: string | undefinedThe heading the entry is listed under while no query narrows the menu.
SlashEntry.iconproperty · packages/richtext-dom/src/editor.ts:161
readonly icon?: string | undefinedThe icon a menu draws for it, by name; a view's own set says what names it knows.