---
title: "IPositionInText | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IPositionInText/"
---

# IPositionInText

> Returns the line index of the position in the text.

## Interfaces

### IPositionInText

#### Methods

##### getLineIndex()

```ts
getLineIndex(): number;
```

###### Returns

`number`

##### getOffset()

```ts
getOffset(): number;
```

Returns the line offset of the position in the text.

###### Returns

`number`

##### getParagraphIndex()

```ts
getParagraphIndex(): number;
```

Returns the paragraph index of the position in the text.

###### Returns

`number`

##### isEqualTo()

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

Compares the current position in text with another.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `position` | [`IPositionInText`](#ipositionintext) | another position in text. |

###### Returns

`boolean`

true if the positions match, false otherwise.
