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
Définition
La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.
API
Propriétés
Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.
- formatrequis(command: TTextareaToolbarCommand, value?: string) => void
- Execute a formatting command. Pass a URL as the second argument for link insertion.
- isFormatrequis(command: TTextareaToolbarCommand) => boolean
- Query whether a given command is currently active at the caret position.
- itemsrequisReadonlyArray<TTextareaToolbarCommand>
- Ordered list of toolbar commands configured via the toolbar prop.
- activerequisITextareaRichActiveState
- Reactive snapshot of the currently active formatting commands at the caret.
Écosystème
Utilisé par
Composants et composables qui étendent ou consomment cette interface.
Usage
Exemples
Extraits de code prêts à coller utilisant cette interface.
Custom toolbar using the slot payload