ITextareaRichActiveState
interface
State & Interaction
Reactive state describing which rich-text toolbar commands are currently active at the caret position. Used by the toolbar to render aria-pressed state and the visual active class.
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- boldrequiredboolean
- Whether the bold command is active at the current caret position.
- italicrequiredboolean
- Whether the italic command is active at the current caret position.
- underlinerequiredboolean
- Whether the underline command is active at the current caret position.
- coderequiredboolean
- Whether the inline code command is active at the current caret position.
- linkrequiredboolean
- Whether the cursor is inside a link at the current caret position.
- listBulletrequiredboolean
- Whether the cursor is inside an unordered list.
- listOrderedrequiredboolean
- Whether the cursor is inside an ordered list.
- headingrequired0 | 1 | 2 | 3
- Active heading level at the caret (0 = no heading, 1 = h1, 2 = h2, 3 = h3).
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Consuming active state in the toolbar slot