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

# NewTextManager

> Manager for performing basic operations with text.

## Classes

### NewTextManager

#### Remarks

The text manager works with the text engine only through the wrapper.

#### Implements

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

#### Constructors

##### Constructor

```ts
new NewTextManager(): NewTextManager;
```

###### Returns

[`NewTextManager`](#newtextmanager)

#### Properties

##### s

```ts
s: any;
```

#### Accessors

##### canRedo

###### Get Signature

```ts
get canRedo(): boolean;
```

Indicates if the action can be redone.

###### Returns

`boolean`

Indicates if the action can be redone.

###### Implementation of

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

##### canUndo

###### Get Signature

```ts
get canUndo(): boolean;
```

Indicates if the action can be undone.

###### Returns

`boolean`

Indicates if the action can be undone.

###### Implementation of

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

##### cursorChangedEvent

###### Get Signature

```ts
get cursorChangedEvent(): EventObject<IPositionInText>;
```

Cursor change event.

###### Remarks

Reports the current cursor position.

###### Returns

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

Cursor change event.

###### Remarks

Reports the current cursor position.

###### Implementation of

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

##### isInitialized

###### Get Signature

```ts
get isInitialized(): boolean;
```

###### Returns

`boolean`

##### selectionChangedEvent

###### Get Signature

```ts
get selectionChangedEvent(): EventObject<ITextRange>;
```

Text selection change event.

###### Remarks

reports the currently selected text.

###### Returns

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

Text selection change event.

###### Remarks

reports the currently selected text.

###### Implementation of

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

##### styleChangedEvent

###### Get Signature

```ts
get styleChangedEvent(): EventObject<void>;
```

Character or paragraph style change event.

###### Returns

`EventObject`\<`void`\>

Character or paragraph style change event.

###### Implementation of

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

##### textChangedEvent

###### Get Signature

```ts
get textChangedEvent(): EventObject<void>;
```

Text content change event.

###### Returns

`EventObject`\<`void`\>

Text content change event.

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`textChangedEvent`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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.

###### Implementation of

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

##### addListItem()

```ts
addListItem(currentParagraphIndex, previousListItemIndex): void;
```

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

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `currentParagraphIndex` | `number` | index of the new list item. |
| `previousListItemIndex` | `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.

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`addListItem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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`

###### Implementation of

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

##### clearCurrentFormatting()

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

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

###### Returns

`void`

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`clearCurrentFormatting`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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`

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`createBulletedListItem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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`

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`createNumberedListItem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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`

###### Implementation of

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

##### deleteAllText()

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

Deletes all text.

###### Returns

`void`

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`deleteAllText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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.

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`deleteListItem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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)

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`deleteTextByRange`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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`

###### Implementation of

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

##### detach()

```ts
detach(): void;
```

###### Returns

`void`

##### 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).

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`findItemToContinueBulletedList`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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).

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`findItemToContinueNumberedList`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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)

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`getCharStyleForPosition`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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)

###### Implementation of

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

##### getCurrentParagraphIndex()

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

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

###### Returns

`number`

###### Implementation of

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

##### getCurrentParagraphLength()

```ts
getCurrentParagraphLength(): number;
```

###### Returns

`number`

##### 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)

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`getCurrentParagraphStyle`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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)

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`getCurrentPosition`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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)

###### Implementation of

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

##### getFormattedText()

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

Returns formatted text.

###### Returns

`string`

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`getFormattedText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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.

###### Implementation of

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

##### getParagraphCount()

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

Returns paragraph count.

###### Returns

`number`

###### Implementation of

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

##### getParagraphLength()

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

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `index` | `number` |

###### Returns

`number`

##### 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)

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`getParagraphStyleByIndex`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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)

###### Implementation of

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

##### getSelectedParagraphIndexes()

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

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

###### Returns

`number`[]

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`getSelectedParagraphIndexes`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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)

###### Implementation of

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

##### getTextLength()

```ts
getTextLength(): number;
```

###### Returns

`number`

##### 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)

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`getTextModel`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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)

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`getTextRangeByPositions`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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`

###### Implementation of

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

##### initialize()

```ts
initialize(initData): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `initData` | [`TextManagerInitData`](#textmanagerinitdata) |

###### Returns

`void`

##### 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`

###### Implementation of

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

##### insertNewLine()

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

Inserts a new line relative to the current cursor position.

###### Returns

`void`

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`insertNewLine`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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`

###### Implementation of

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

##### isCaretOnEndOfParagraph()

```ts
isCaretOnEndOfParagraph(): boolean;
```

###### Returns

`boolean`

##### isCaretOnTheBeginingOfParagraph()

```ts
isCaretOnTheBeginingOfParagraph(): boolean;
```

###### Returns

`boolean`

##### 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.

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`isParagraphAListItem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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`

###### Implementation of

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

##### isSelectionCollapsed()

```ts
isSelectionCollapsed(): boolean;
```

###### Returns

`boolean`

##### measureText()

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

Measures text.

###### Parameters

| Parameter | Type | Default value | Description |
| ------ | ------ | ------ | ------ |
| `scale` | `number` | `undefined` | scale. |
| `isExtendToBlackBox` | `boolean` | `false` | indicates if extend to black box. |

###### Returns

`RectangleF`

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`measureText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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`

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`measureTextFrames`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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`

###### Implementation of

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

##### pauseUndoRedo()

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

Pauses saving actions.

###### Returns

`void`

###### Remarks

can be used to combine multiple actions into one.

###### Implementation of

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

##### redo()

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

Redoes an action.

###### Returns

`void`

###### Implementation of

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

##### resetSelection()

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

Resets text selection.

###### Returns

`void`

###### Implementation of

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

##### resumeUndoRedo()

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

Resumes saving actions.

###### Returns

`void`

###### Remarks

can be used to combine multiple actions into one.

###### Implementation of

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

##### selectAllText()

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

Selects all text.

###### Returns

`void`

###### Implementation of

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

##### selectCurrentParagraph()

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

Selects a paragraph relative to the current cursor position.

###### Returns

`void`

###### Implementation of

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

##### selectCurrentWord()

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

Selects a word relative to the current cursor position.

###### Returns

`void`

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`selectCurrentWord`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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`

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`setCharStyleForPosition`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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.

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`setCurrentCharStyle`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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.

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`setCurrentParagraphStyle`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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`

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`setCursorToPoint`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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`

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`setCursorToPosition`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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.

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`setParagraphStyleByIndex`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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`

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`setSelection`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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`

###### Implementation of

[`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager).[`setTextModel`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.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`

###### Implementation of

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

##### undo()

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

Undoes an action.

###### Returns

`void`

###### Implementation of

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

***

### TextManagerInitData

#### Constructors

##### Constructor

```ts
new TextManagerInitData(): TextManagerInitData;
```

###### Returns

[`TextManagerInitData`](#textmanagerinitdata)

#### Properties

##### listStyleSheetManager

```ts
listStyleSheetManager: IListStyleSheetManager;
```

##### textEngineWrapper

```ts
textEngineWrapper: ITextEngineWrapper;
```
