---
title: "ITextRange | Customer&#x27;s Canvas"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextRange/"
archived: false
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Customer's Canvas Hub"
    versions: ["cloud"]
    entity_id: "https://customerscanvas.com/products/hub#software-application"
  - product: "Design Atoms JS"
    versions: ["7.4"]
---

# ITextRange

**Applies to:** Customer's Canvas On-Premises; Customer's Canvas Hub cloud; Design Atoms JS 7.4

> API reference for the ITextRange module in @aurigma/design-atoms-text.

## Interfaces

### ITextRange

#### Properties

##### isEmpty

```ts
isEmpty: boolean;
```

Indicates that the text range is empty (starting position is the same as ending position).

##### isValid

```ts
isValid: boolean;
```

Indicates that the original text still exists and was not modified.

#### Methods

##### getEndPosition()

```ts
getEndPosition(): IPositionInText;
```

Returns the end position of text range.

###### Returns

[`IPositionInText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IPositionInText.md#ipositionintext)

##### getFormattedText()

```ts
getFormattedText(): string;
```

Returns the formatted text of text range.

###### Returns

`string`

##### getLeftPosition()

```ts
getLeftPosition(): IPositionInText;
```

Returns the left position of text range.

###### Returns

[`IPositionInText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IPositionInText.md#ipositionintext)

##### getParagraphIndexes()

```ts
getParagraphIndexes(): number[];
```

Returns the indexes of paragraphs within a text range.

###### Returns

`number`[]

###### Remarks

Indexes are ordered from lowest to highest.

##### getPlainText()

```ts
getPlainText(): string;
```

Returns the plain text (without formatting) of text range.

###### Returns

`string`

##### getRightPosition()

```ts
getRightPosition(): IPositionInText;
```

Returns the right position of text range.

###### Returns

[`IPositionInText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IPositionInText.md#ipositionintext)

##### getStartPosition()

```ts
getStartPosition(): IPositionInText;
```

Returns the start position of text range.

###### Returns

[`IPositionInText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IPositionInText.md#ipositionintext)

##### isEqualTo()

```ts
isEqualTo(textRange): boolean;
```

Compares the current text range with another.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `textRange` | [`ITextRange`](#itextrange) | another text range. |

###### Returns

`boolean`

true if the ranges match, false otherwise.
