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

# ITextManager

> Manager for performing basic operations with text.

## Interfaces

### ITextManager

#### Extends

- [`ICursorService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICursorService.md#icursorservice).[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`IStyleService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#istyleservice).[`ISelectionService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#iselectionservice).[`IListService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#ilistservice).[`IUndoRedoService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IUndoRedoService.md#iundoredoservice)

#### Properties

##### canRedo

```ts
canRedo: boolean;
```

Indicates if the action can be redone.

###### Inherited from

[`IUndoRedoService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IUndoRedoService.md#iundoredoservice).[`canRedo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IUndoRedoService.md#canredo)

##### canUndo

```ts
canUndo: boolean;
```

Indicates if the action can be undone.

###### Inherited from

[`IUndoRedoService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IUndoRedoService.md#iundoredoservice).[`canUndo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IUndoRedoService.md#canundo)

##### cursorChangedEvent

```ts
cursorChangedEvent: EventObject<IPositionInText>;
```

Cursor change event.

###### Remarks

Reports the current cursor position.

###### Inherited from

[`ICursorService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICursorService.md#icursorservice).[`cursorChangedEvent`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICursorService.md#cursorchangedevent)

##### selectionChangedEvent

```ts
selectionChangedEvent: EventObject<ITextRange>;
```

Text selection change event.

###### Remarks

reports the currently selected text.

###### Inherited from

[`ISelectionService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#iselectionservice).[`selectionChangedEvent`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#selectionchangedevent)

##### styleChangedEvent

```ts
styleChangedEvent: EventObject<void>;
```

Character or paragraph style change event.

###### Inherited from

[`IStyleService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#istyleservice).[`styleChangedEvent`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#stylechangedevent)

##### textChangedEvent

```ts
textChangedEvent: EventObject<void>;
```

Text content change event.

###### Inherited from

[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`textChangedEvent`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#textchangedevent)

#### Methods

##### actualizeStyleManager()

```ts
actualizeStyleManager(): void;
```

Actualize all list styles (by name) in the style sheet manager.

###### Returns

`void`

###### Remarks

The actual list styles are the styles in TextWhizz.

###### Inherited from

[`IListService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#ilistservice).[`actualizeStyleManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#actualizestylemanager)

##### addListItem()

```ts
addListItem(newListItemIndex, existingListItemIndex): void;
```

Adds a new list item to an existing list by the paragraph index.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `newListItemIndex` | `number` | index of the new list item. |
| `existingListItemIndex` | `number` | the index of the existing (previous) list item. |

###### Returns

`void`

###### Remarks

there must be no other items of the same list between the current index and the index of the previous list item.

###### Inherited from

[`IListService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#ilistservice).[`addListItem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#addlistitem)

##### applyListType()

```ts
applyListType(paragraphIndexes, listType): void;
```

Applies a list type to paragraphs by their indexes.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `paragraphIndexes` | `number`[] | paragraph indexes. |
| `listType` | [`ListType`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ListType.md#listtype) | list type. |

###### Returns

`void`

###### Inherited from

[`IListService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#ilistservice).[`applyListType`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#applylisttype)

##### clearCurrentFormatting()

```ts
clearCurrentFormatting(): void;
```

Clears formatting (character style) for the current cursor position or selected text.

###### Returns

`void`

###### Inherited from

[`IStyleService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#istyleservice).[`clearCurrentFormatting`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#clearcurrentformatting)

##### createBulletedListItem()

```ts
createBulletedListItem(paragraphIndex, bulletCharCode): void;
```

Creates a new top-level bulleted list item.

###### Parameters

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

###### Returns

`void`

###### Inherited from

[`IListService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#ilistservice).[`createBulletedListItem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#createbulletedlistitem)

##### createNumberedListItem()

```ts
createNumberedListItem(paragraphIndex, format): void;
```

Creates a new top-level numbered list item.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `paragraphIndex` | `number` | paragraph index. |
| `format` | [`NumberingFormatType`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/NumberingFormatType.md#numberingformattype) | numbering format. |

###### Returns

`void`

###### Inherited from

[`IListService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#ilistservice).[`createNumberedListItem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#createnumberedlistitem)

##### decreaseListItemIndent()

```ts
decreaseListItemIndent(paragraphIndex): void;
```

Decreases the nesting level of the list item by the paragraph index.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `paragraphIndex` | `number` | paragraph index. |

###### Returns

`void`

###### Inherited from

[`IListService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#ilistservice).[`decreaseListItemIndent`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#decreaselistitemindent)

##### deleteAllText()

```ts
deleteAllText(): void;
```

Deletes all text.

###### Returns

`void`

###### Inherited from

[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`deleteAllText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#deletealltext)

##### deleteListItem()

```ts
deleteListItem(paragraphIndex): void;
```

Removes the existing list item by the paragraph index.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `paragraphIndex` | `number` | the paragraph index of the list item to remove. |

###### Returns

`void`

###### Remarks

only list item is removed, paragraph text is not removed.

###### Inherited from

[`IListService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#ilistservice).[`deleteListItem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#deletelistitem)

##### deleteTextByRange()

```ts
deleteTextByRange(textRange): IPositionInText;
```

Deletes text by range

###### Parameters

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

###### Returns

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

###### Inherited from

[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`deleteTextByRange`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#deletetextbyrange)

##### deleteTextToDirection()

```ts
deleteTextToDirection(direction): void;
```

Deletes the selected text or character relative to the current cursor position.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `direction` | [`MoveDirectionType`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/MoveDirectionType.md#movedirectiontype) | direction of text deletion. |

###### Returns

`void`

###### Inherited from

[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`deleteTextToDirection`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#deletetexttodirection)

##### findItemToContinueBulletedList()

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

Finds the previous list item to continue bulleted list.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `paragraphIndex` | `number` | index of the current paragraph. |
| `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).

###### Inherited from

[`IListService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#ilistservice).[`findItemToContinueBulletedList`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#finditemtocontinuebulletedlist)

##### findItemToContinueNumberedList()

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

Finds the previous list item to continue bulleted list.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `paragraphIndex` | `number` | index of the current paragraph. |
| `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).

###### Inherited from

[`IListService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#ilistservice).[`findItemToContinueNumberedList`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#finditemtocontinuenumberedlist)

##### getCharStyleForPosition()

```ts
getCharStyleForPosition(position): ICharStyle;
```

Returns the character style by position.

###### Parameters

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

###### Returns

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

###### Inherited from

[`IStyleService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#istyleservice).[`getCharStyleForPosition`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#getcharstyleforposition)

##### getCurrentCharStyle()

```ts
getCurrentCharStyle(): ICharStyle;
```

Returns the character style for the current cursor position or the starting position of the selected text.

###### Returns

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

###### Inherited from

[`IStyleService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#istyleservice).[`getCurrentCharStyle`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#getcurrentcharstyle)

##### getCurrentParagraphIndex()

```ts
getCurrentParagraphIndex(): number;
```

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

###### Returns

`number`

###### Inherited from

[`ICursorService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICursorService.md#icursorservice).[`getCurrentParagraphIndex`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICursorService.md#getcurrentparagraphindex)

##### getCurrentParagraphStyle()

```ts
getCurrentParagraphStyle(): IParagraphStyle;
```

Returns the paragraph style for the current cursor position or the first paragraph of the selected text.

###### Returns

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

###### Inherited from

[`IStyleService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#istyleservice).[`getCurrentParagraphStyle`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#getcurrentparagraphstyle)

##### getCurrentPosition()

```ts
getCurrentPosition(): IPositionInText;
```

Returns the current cursor position.

###### Returns

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

###### Inherited from

[`ICursorService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICursorService.md#icursorservice).[`getCurrentPosition`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICursorService.md#getcurrentposition)

##### getFirstPosition()

```ts
getFirstPosition(): IPositionInText;
```

Returns the first position in the text.

###### Returns

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

###### Inherited from

[`ICursorService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICursorService.md#icursorservice).[`getFirstPosition`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICursorService.md#getfirstposition)

##### getFormattedText()

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

Returns formatted text.

###### Returns

`string`

###### Inherited from

[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`getFormattedText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#getformattedtext)

##### getListItemStyle()

```ts
getListItemStyle(paragraphIndex): IListStyle;
```

Returns the style of the list item by the paragraph index.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `paragraphIndex` | `number` | paragraph index. |

###### Returns

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

###### Remarks

if the list item is not found, null is returned.

###### Inherited from

[`IListService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#ilistservice).[`getListItemStyle`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#getlistitemstyle)

##### getParagraphCount()

```ts
getParagraphCount(): number;
```

Returns paragraph count.

###### Returns

`number`

###### Inherited from

[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`getParagraphCount`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#getparagraphcount)

##### getParagraphStyleByIndex()

```ts
getParagraphStyleByIndex(index): IParagraphStyle;
```

Returns the  paragraph style by index.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `index` | `number` | paragraph index (from 0). |

###### Returns

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

###### Inherited from

[`IStyleService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#istyleservice).[`getParagraphStyleByIndex`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#getparagraphstylebyindex)

##### getParagraphText()

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

Returns the text range of a paragraph by index.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `paragraphIndex` | `any` | paragraph index (from 0). |

###### Returns

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

###### Inherited from

[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`getParagraphText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#getparagraphtext)

##### getSelectedParagraphIndexes()

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

Returns the currently selected paragraphs indexes (by selection or cursor position).

###### Returns

`number`[]

###### Inherited from

[`ISelectionService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#iselectionservice).[`getSelectedParagraphIndexes`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#getselectedparagraphindexes)

##### getSelectedTextRange()

```ts
getSelectedTextRange(): 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)

###### Inherited from

[`ISelectionService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#iselectionservice).[`getSelectedTextRange`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#getselectedtextrange)

##### getTextModel()

```ts
getTextModel(): Text;
```

Returns the text model.

###### Returns

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

###### Inherited from

[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`getTextModel`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#gettextmodel)

##### getTextRangeByPositions()

```ts
getTextRangeByPositions(startPosition, endPosition): ITextRange;
```

Returns the range of text by starting and ending position.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `startPosition` | [`IPositionInText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IPositionInText.md#ipositionintext) | starting position. |
| `endPosition` | [`IPositionInText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IPositionInText.md#ipositionintext) | ending position. |

###### Returns

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

###### Inherited from

[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`getTextRangeByPositions`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#gettextrangebypositions)

##### increaseListItemIndent()

```ts
increaseListItemIndent(paragraphIndex): void;
```

Increases the nesting level of the list item by the paragraph index.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `paragraphIndex` | `number` | paragraph index. |

###### Returns

`void`

###### Inherited from

[`IListService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#ilistservice).[`increaseListItemIndent`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#increaselistitemindent)

##### insertFormattedText()

```ts
insertFormattedText(text): void;
```

Inserts formatted text relative to the current cursor position.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `text` | `string` | text to insert. |

###### Returns

`void`

###### Inherited from

[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`insertFormattedText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#insertformattedtext)

##### insertNewLine()

```ts
insertNewLine(): void;
```

Inserts a new line relative to the current cursor position.

###### Returns

`void`

###### Inherited from

[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`insertNewLine`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#insertnewline)

##### insertPlainText()

```ts
insertPlainText(text): void;
```

Inserts plain text relative to the current cursor position.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `text` | `string` | text to insert. |

###### Returns

`void`

###### Inherited from

[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`insertPlainText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#insertplaintext)

##### isParagraphAListItem()

```ts
isParagraphAListItem(paragraphIndex): boolean;
```

Indicates if a paragraph is a list item.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `paragraphIndex` | `number` | paragraph index. |

###### Returns

`boolean`

returns true if the paragraph is a list item, false otherwise.

###### Inherited from

[`IListService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#ilistservice).[`isParagraphAListItem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#isparagraphalistitem)

##### isParagraphsTheSameList()

```ts
isParagraphsTheSameList(paragraphIndexes): boolean;
```

Indicates if the paragraphs are the same list.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `paragraphIndexes` | `number`[] | paragraph indexes. |

###### Returns

`boolean`

###### Inherited from

[`IListService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#ilistservice).[`isParagraphsTheSameList`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListService.md#isparagraphsthesamelist)

##### measureText()

```ts
measureText(scale, isExtendToBlackBox?): RectangleF;
```

Measures text.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `scale` | `number` | scale. |
| `isExtendToBlackBox?` | `boolean` | indicates if extend to black box. |

###### Returns

`RectangleF`

###### Inherited from

[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`measureText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#measuretext)

##### measureTextFrames()

```ts
measureTextFrames(useActiveText): RectangleF;
```

Measures the text frame.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `useActiveText` | `boolean` | true if you want to use the currently active text, false if the item's original text. |

###### Returns

`RectangleF`

###### Inherited from

[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`measureTextFrames`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#measuretextframes)

##### moveCursorToDirection()

```ts
moveCursorToDirection(direction, withSelection?): void;
```

Moves the current cursor position in the specified direction.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `direction` | [`MoveDirectionType`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/MoveDirectionType.md#movedirectiontype) | direction of cursor movement. |
| `withSelection?` | `boolean` | indicates whether the cursor moves with text selection (the default value is false). |

###### Returns

`void`

###### Inherited from

[`ICursorService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICursorService.md#icursorservice).[`moveCursorToDirection`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICursorService.md#movecursortodirection)

##### pauseUndoRedo()

```ts
pauseUndoRedo(): void;
```

Pauses saving actions.

###### Returns

`void`

###### Remarks

can be used to combine multiple actions into one.

###### Inherited from

[`IUndoRedoService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IUndoRedoService.md#iundoredoservice).[`pauseUndoRedo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IUndoRedoService.md#pauseundoredo)

##### redo()

```ts
redo(): void;
```

Redoes an action.

###### Returns

`void`

###### Inherited from

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

##### resetSelection()

```ts
resetSelection(): void;
```

Resets text selection.

###### Returns

`void`

###### Inherited from

[`ISelectionService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#iselectionservice).[`resetSelection`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#resetselection)

##### resumeUndoRedo()

```ts
resumeUndoRedo(): void;
```

Resumes saving actions.

###### Returns

`void`

###### Remarks

can be used to combine multiple actions into one.

###### Inherited from

[`IUndoRedoService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IUndoRedoService.md#iundoredoservice).[`resumeUndoRedo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IUndoRedoService.md#resumeundoredo)

##### selectAllText()

```ts
selectAllText(): void;
```

Selects all text.

###### Returns

`void`

###### Inherited from

[`ISelectionService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#iselectionservice).[`selectAllText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#selectalltext)

##### selectCurrentParagraph()

```ts
selectCurrentParagraph(): void;
```

Selects a paragraph relative to the current cursor position.

###### Returns

`void`

###### Inherited from

[`ISelectionService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#iselectionservice).[`selectCurrentParagraph`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#selectcurrentparagraph)

##### selectCurrentWord()

```ts
selectCurrentWord(): void;
```

Selects a word relative to the current cursor position.

###### Returns

`void`

###### Inherited from

[`ISelectionService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#iselectionservice).[`selectCurrentWord`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#selectcurrentword)

##### setCharStyleForPosition()

```ts
setCharStyleForPosition(position, style): void;
```

Sets the character style by position.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `position` | [`IPositionInText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IPositionInText.md#ipositionintext) | position in text. |
| `style` | [`ICharStyle`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICharStyle.md#icharstyle) | expected character style. |

###### Returns

`void`

###### Inherited from

[`IStyleService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#istyleservice).[`setCharStyleForPosition`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#setcharstyleforposition)

##### setCurrentCharStyle()

```ts
setCurrentCharStyle(style): void;
```

Sets the character style for the current cursor position or selected text.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `style` | [`ICharStyle`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICharStyle.md#icharstyle) | expected character style. |

###### Returns

`void`

###### Remarks

only properties specified in the expected style are set.

###### Inherited from

[`IStyleService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#istyleservice).[`setCurrentCharStyle`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#setcurrentcharstyle)

##### setCurrentParagraphStyle()

```ts
setCurrentParagraphStyle(style): void;
```

Sets the paragraph style for the current cursor position or selected text.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `style` | [`IParagraphStyle`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IParagraphStyle.md#iparagraphstyle) | expected paragraph style. |

###### Returns

`void`

###### Remarks

only properties specified in the expected style are set.

###### Inherited from

[`IStyleService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#istyleservice).[`setCurrentParagraphStyle`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#setcurrentparagraphstyle)

##### setCursorToPoint()

```ts
setCursorToPoint(point): void;
```

Sets the cursor to a point in the text.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `point` | [IPoint](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-model/IPoint.md) | the expected point. |

###### Returns

`void`

###### Inherited from

[`ICursorService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICursorService.md#icursorservice).[`setCursorToPoint`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICursorService.md#setcursortopoint)

##### setCursorToPosition()

```ts
setCursorToPosition(position): void;
```

Sets the cursor at a position in the text.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `position` | [`IPositionInText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IPositionInText.md#ipositionintext) | the expected position in the text. |

###### Returns

`void`

###### Inherited from

[`ICursorService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICursorService.md#icursorservice).[`setCursorToPosition`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICursorService.md#setcursortoposition)

##### setParagraphStyleByIndex()

```ts
setParagraphStyleByIndex(index, style): void;
```

Sets the paragraph style by index.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `index` | `number` | paragraph index (from 0). |
| `style` | [`IParagraphStyle`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IParagraphStyle.md#iparagraphstyle) | expected paragraph style. |

###### Returns

`void`

###### Remarks

only properties specified in the expected style are set.

###### Inherited from

[`IStyleService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#istyleservice).[`setParagraphStyleByIndex`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IStyleService.md#setparagraphstylebyindex)

##### setSelection()

```ts
setSelection(startPoint, endPoint): void;
```

Sets the selection of text by starting and ending points.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `startPoint` | [IPoint](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-model/IPoint.md) | starting point. |
| `endPoint` | [IPoint](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-model/IPoint.md) | ending point. |

###### Returns

`void`

###### Inherited from

[`ISelectionService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#iselectionservice).[`setSelection`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService.md#setselection)

##### setTextModel()

```ts
setTextModel(model): void;
```

Sets the text model.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `model` | [`Text`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/Text.md#text) | text model. |

###### Returns

`void`

###### Inherited from

[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`setTextModel`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#settextmodel)

##### setWrappingPath()

```ts
setWrappingPath(data): void;
```

Sets the wrapping path.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `data` | [`IWrappingPathData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IWrappingPathData.md#iwrappingpathdata) | wrapping path data. |

###### Returns

`void`

###### Inherited from

[`ITextService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#itextservice).[`setWrappingPath`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextService.md#setwrappingpath)

##### undo()

```ts
undo(): void;
```

Undoes an action.

###### Returns

`void`

###### Inherited from

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