# RichTextToolbarState (@salmonui/rich-text)

> The RichTextToolbarState interface of @salmonui/rich-text: Derived toolbar state (onToolbarStateChange).

Canonical: https://salmonui.dev/docs/reference/rich-text/RichTextToolbarState

```ts
import type { RichTextToolbarState } from '@salmonui/rich-text';
```

Entry index: https://salmonui.dev/docs/reference/rich-text (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/rich-text.md).

## Reference

Kind: interface

```ts
interface RichTextToolbarState {
    readonly marks: Readonly<Record<'bold' | 'italic' | 'underline' | 'strike' | 'subscript' | 'superscript' | 'code', boolean>>;
    readonly fontFamily: string | null;
    readonly fontSize: string | null;
    readonly color: string | null;
    readonly backgroundColor: string | null;
    readonly block: string;
    readonly textAlign: RichTextTextAlign | null;
    readonly lineHeight: string | null;
    readonly list: 'bullet' | 'ordered' | 'task' | null;
    readonly link: string | null;
    readonly inTable: boolean;
    readonly node: 'image' | 'figure' | 'audio' | 'video' | 'embed' | 'horizontal_rule' | null;
    readonly canUndo: boolean;
    readonly canRedo: boolean;
    readonly count: number;
    readonly empty: boolean;
    readonly selectionEmpty: boolean;
    readonly painter: boolean;
    readonly findCount: number;
    readonly findIndex: number;
    readonly suggest: {
        readonly id: string;
        readonly query: string;
        readonly from: number;
    } | null;
}
```

Derived toolbar state (`onToolbarStateChange`).

Members (21):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `marks` | `readonly marks: Readonly<Record<'bold' \| 'italic' \| 'underline' \| 'strike' \| 'subscript' \| 'superscript' \| 'code', boolean>>;` |  |  |
| `fontFamily` | `readonly fontFamily: string \| null;` |  |  |
| `fontSize` | `readonly fontSize: string \| null;` |  |  |
| `color` | `readonly color: string \| null;` |  |  |
| `backgroundColor` | `readonly backgroundColor: string \| null;` |  |  |
| `block` | `readonly block: string;` |  | `'p'`, `'h1'`..`'h6'`, `'code'` or `'blockquote'`. |
| `textAlign` | `readonly textAlign: RichTextTextAlign \| null;` |  |  |
| `lineHeight` | `readonly lineHeight: string \| null;` |  |  |
| `list` | `readonly list: 'bullet' \| 'ordered' \| 'task' \| null;` |  |  |
| `link` | `readonly link: string \| null;` |  | The href of the link at the selection. |
| `inTable` | `readonly inTable: boolean;` |  |  |
| `node` | `readonly node: 'image' \| 'figure' \| 'audio' \| 'video' \| 'embed' \| 'horizontal_rule' \| null;` |  | The selected node (or the figure around the caret). |
| `canUndo` | `readonly canUndo: boolean;` |  |  |
| `canRedo` | `readonly canRedo: boolean;` |  |  |
| `count` | `readonly count: number;` |  | Character count (text and inline atoms, no block separators). |
| `empty` | `readonly empty: boolean;` |  |  |
| `selectionEmpty` | `readonly selectionEmpty: boolean;` |  |  |
| `painter` | `readonly painter: boolean;` |  |  |
| `findCount` | `readonly findCount: number;` |  |  |
| `findIndex` | `readonly findIndex: number;` |  |  |
| `suggest` | `readonly suggest: {     readonly id: string;     readonly query: string;     readonly from: number; } \| null;` |  | The active slash or emoji trigger. |
