IUseTextareaRichOptions

interface
Composable Options

Returned shape of the useTextareaRich composable. Components consume the public surface (refs + handlers) to render the contenteditable editor and bind the toolbar.

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.

typescript

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.

disabled
requis
() => boolean
Whether the editor surface is currently editable. Bound to the contenteditable attribute downstream.
value
requis
() => string
Initial / external HTML value (already sanitised by the host component when running in output="html" mode).
onUpdate
requis
(raw: string) => void
Sanitised HTML emit handler. Fired whenever the editor mutates.
onFormat
requis
(command: TTextareaToolbarCommand, value?: string) => void
Notified each time a toolbar command runs.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Binding useTextareaRich to a contenteditable surface

typescript