BuilderCommand.id
property · packages/builder/src/index.ts:703
readonly id: stringComposition / foldkit-builder
interface · packages/builder/src/index.ts:702
interface BuilderCommand {
readonly id: string
readonly label: string
readonly keys: ReadonlyArray<CommandKey>
readonly placement: ReadonlyArray<'node' | 'toolbar' | 'keyboard'>
readonly run: (
model: Pick<Model, 'page' | 'selected'>,
) => Option.Option<Message>
}One thing the editor does, and every way to ask for it.
BuilderCommand.idproperty · packages/builder/src/index.ts:703
readonly id: stringBuilderCommand.labelproperty · packages/builder/src/index.ts:705
readonly label: stringWhat it is called, on its button and in the list of shortcuts.
BuilderCommand.keysproperty · packages/builder/src/index.ts:707
readonly keys: ReadonlyArray<CommandKey>The keys that run it; the first is the one shown. None for one run only by a button.
BuilderCommand.placementproperty · packages/builder/src/index.ts:709
readonly placement: ReadonlyArray<'node' | 'toolbar' | 'keyboard'>Where a drawn Builder offers it: with the selected node's actions, in the toolbar, or by key only.
BuilderCommand.runproperty · packages/builder/src/index.ts:711
readonly run: (
model: Pick<Model, 'page' | 'selected'>,
) => Option.Option<Message>The Message it sends now; none while it has nothing to do, which disables its button.