ITextareaToolbarSlotProps

interface
Component Slots

Public payload exposed by the #toolbar slot of OrigamTextareaField. Consumers can render a fully custom toolbar while still reusing the core formatting machinery.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

format
required
(command: TTextareaToolbarCommand, value?: string) => void
Execute a formatting command. Pass a URL as the second argument for link insertion.
isFormat
required
(command: TTextareaToolbarCommand) => boolean
Query whether a given command is currently active at the caret position.
items
required
ReadonlyArray<TTextareaToolbarCommand>
Ordered list of toolbar commands configured via the toolbar prop.
active
required
ITextareaRichActiveState
Reactive snapshot of the currently active formatting commands at the caret.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Custom toolbar using the slot payload

vue