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

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.

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

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Binding useTextareaRich to a contenteditable surface

typescript