aspnet-js-richeditselection-d370ded8.md
Specifies an array of selected intervals in the document.
get intervals(): Interval[]
set intervals(value: Interval[])
| Type | Description |
|---|---|
| Interval[] |
An array of Interval objects.
|
The intervals property specifies the selected interval(s). The available interval types are listed below.
| Interval Type | Description | Example |
|---|---|---|
| Collapsed (the cursor position) | ||
| A single selected interval of zero length. | ||
| Expanded | ||
| A single selected interval of non-zero length. | ||
| Multiple | ||
| Multiple selected intervals of non-zero lengths. |
// Collapsed
richEdit.selection.intervals = [{ start: 6, length: 0 }];
// Expanded
richEdit.selection.intervals = [{ start: 7, length: 3 }];
// Multiple
richEdit.selection.intervals = [{ start: 2, length: 1 }, { start: 6, length: 1 }];
Refer to the following section for more information: Client Selection.
See Also