# RichTextSelection (@salmonui/rich-text)

> The RichTextSelection interface of @salmonui/rich-text.

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

```ts
import type { RichTextSelection } 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 RichTextSelection {
    readonly anchor: number;
    readonly head: number;
    readonly from: number;
    readonly to: number;
    readonly empty: boolean;
    readonly text: string;
}
```

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `anchor` | `readonly anchor: number;` |  |  |
| `head` | `readonly head: number;` |  |  |
| `from` | `readonly from: number;` |  |  |
| `to` | `readonly to: number;` |  |  |
| `empty` | `readonly empty: boolean;` |  |  |
| `text` | `readonly text: string;` |  | Selected plain text. |
