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

# ICurrentTextInfo

> Information about the current cursor position and selected text.

## Interfaces

### ICurrentTextInfo

#### Properties

##### isCaretAtTheEndOfParagraph

```ts
isCaretAtTheEndOfParagraph: boolean;
```

Indicates if the cursor is at the end of a paragraph.

##### isCursorAtTheBeginningOfParagraph

```ts
isCursorAtTheBeginningOfParagraph: boolean;
```

Indicates if the cursor is at the beginning of a paragraph.

##### isParagraphAListItem

```ts
isParagraphAListItem: boolean;
```

Indicates if the current paragraph is a list item.

##### isParagraphEmpty

```ts
isParagraphEmpty: boolean;
```

Indicates if the current paragraph is empty.

##### isSelectionCollapsed

```ts
isSelectionCollapsed: boolean;
```

Indicates that current selection is collapsed.

##### isSelectionMultiline

```ts
isSelectionMultiline: boolean;
```

Indicates that current selection is multiline.

#### Methods

##### findItemToContinueBulletedList()

```ts
findItemToContinueBulletedList(bulletCharCode): number;
```

Finds the previous list item to continue bulleted list.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `bulletCharCode` | `number` | character code used as 'bullet' (e.g., code 8225 used for “‡“). |

###### Returns

`number`

the paragraph index of the found list item (if it was found).

##### findItemToContinueNumberedList()

```ts
findItemToContinueNumberedList(format, itemNumber): number;
```

Finds the previous list item to continue bulleted list.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `format` | [`NumberingFormatType`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/NumberingFormatType.md#numberingformattype) | numbering format. |
| `itemNumber` | `number` | list item number (from 1). |

###### Returns

`number`

the paragraph index of the found list item (if it was found).

##### getCursorPosition()

```ts
getCursorPosition(): IPositionInText;
```

Returns the current cursor position.

###### Returns

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

##### getListItemLevel()

```ts
getListItemLevel(): number;
```

Returns the nesting level of a list item (from 0).

###### Returns

`number`

###### Remarks

if the paragraph is not a list element, then returned 'null'.

##### getNextParagraphLength()

```ts
getNextParagraphLength(): number;
```

Returns the next paragraph text length.

###### Returns

`number`

##### getParagraphIndex()

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

Returns the current index of the paragraph (from 0).

###### Returns

`number`

##### getParagraphLength()

```ts
getParagraphLength(index): number;
```

Returns the text length of the paragraph with specified index.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `index` | `number` | index of the paragraph. |

###### Returns

`number`

##### getParagraphText()

```ts
getParagraphText(): ITextRange;
```

Returns the text range of a paragraph by index.

###### Returns

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

##### getPreviousParagraphLength()

```ts
getPreviousParagraphLength(): number;
```

Returns the previous paragraph text length.

###### Returns

`number`

##### getSelection()

```ts
getSelection(): ITextRange;
```

Returns the currently selected text range.

###### Returns

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

##### getSelectionLeftParagraphIndex()

```ts
getSelectionLeftParagraphIndex(): number;
```

###### Returns

`number`

##### getSelectionLeftParagraphLength()

```ts
getSelectionLeftParagraphLength(): number;
```

###### Returns

`number`

##### getSelectionLeftParagraphOffset()

```ts
getSelectionLeftParagraphOffset(): number;
```

###### Returns

`number`

##### getSelectionRightParagraphIndex()

```ts
getSelectionRightParagraphIndex(): number;
```

###### Returns

`number`

##### getSelectionRightParagraphLength()

```ts
getSelectionRightParagraphLength(): number;
```

###### Returns

`number`

##### getSelectionRightParagraphOffset()

```ts
getSelectionRightParagraphOffset(): number;
```

###### Returns

`number`

##### getTextFromStartOfParagraph()

```ts
getTextFromStartOfParagraph(): ITextRange;
```

Returns the text range from the beginning of the paragraph to the current position.

###### Returns

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

##### getTextMetrics()

```ts
getTextMetrics(): ITextMetrics;
```

Returns the current text metrics (for limits): textLength, currentLineLength, linesCount, isSelectionCollapsed.

###### Returns

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