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

# ITextEditor

> A structure defining layout settings and format of lists in text elements.

## Interfaces

### IListConfiguration

#### Properties

##### bulletChar

```ts
bulletChar: string;
```

The bulleted list marker that will be used when creating lists through the Top toolbar. The default value is "•" (0x8226).

##### firstLineIndent

```ts
firstLineIndent: number;
```

The distance between the bullet and text in the first line of a list item, in points. The default value is -20.

##### levelIndent

```ts
levelIndent: number;
```

The offset of each next level of the list relative to the previous level, in points. The default value is 30.

##### listIndent

```ts
listIndent: number;
```

The distance between the left edge of the text element and the leftmost line of list items in this text element, in points. The default value is 30.

##### maxLevel

```ts
maxLevel: number;
```

The maximum number of levels in multilevel lists. The default value is 3.

##### numberingFormat

```ts
numberingFormat: NumberingFormatType;
```

The numbered list marker format, one of "none", "number", "lowerLetter", "upperLetter", "lowerRoman", or "upperRoman". If "none", then list items will represent paragraphs without numbers. This marker format will be used when creating lists through the Top toolbar. The default value is "number".

##### tabOffset

```ts
tabOffset: number;
```

The offset that will appear before text on the first line if this text may overlap the bullet, in points. If this value is not enough to create an indent, it will be added again. The default value is 30.

***

### ITextEditor

Executes a command of the specified type.

#### Extends

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

#### Properties

##### canRedo

```ts
canRedo: boolean;
```

Indicates if the action can be redone.

##### canUndo

```ts
canUndo: boolean;
```

Indicates if the action can be undone.

##### disableDrawBaseline

```ts
disableDrawBaseline: boolean;
```

##### editorInitialized

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

Editor initialization event.

##### frameChanged

```ts
frameChanged: EventObject<RectangleF>;
```

Text frame change event.

###### Remarks

Reports the currently text frame.

##### highlightInEditingModeEnabled

```ts
highlightInEditingModeEnabled: boolean;
```

Indicates if the editor has to be highlighted when in editing mode.

##### invalidCharEntered

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

Invalid character input event.

##### isActive

```ts
isActive: boolean;
```

Indicates if the editor is in editing mode.

##### isReady

```ts
isReady: boolean;
```

Indicates if the editor is initialized and ready to work.

##### redrawActiveTextInEditMode

```ts
redrawActiveTextInEditMode: boolean;
```

Indicates if the editor needs to redraw ActiveText when it is edited.

##### styleChanged

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

Character or paragraph style change event.

##### textLimits

```ts
textLimits: ITextLimits;
```

Get current text limits.

##### textLimitsViolationEvent

```ts
textLimitsViolationEvent: EventObject<ILimitsViolationEventData>;
```

##### textMetrics

```ts
textMetrics: ITextMetrics;
```

Get current text data: characters count, paragraphs count, current paragraph characters count.

##### textMetricsChangedEvent

```ts
textMetricsChangedEvent: EventObject<ITextMetrics>;
```

#### Methods

##### dispose()

```ts
dispose(): void;
```

Disposes text editor when its no longer needed.

###### Returns

`void`

##### enterEditMode()

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

Enters the editing mode.

###### Parameters

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

###### Returns

`void`

##### executeCommand()

###### Call Signature

```ts
executeCommand(type): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`undo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-undo) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`redo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-redo) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`setCursor`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-setcursor) |
| `data` | [`SetCursorCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/SetCursorCmd.md#setcursorcmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`moveCursor`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-movecursor) |
| `data` | [`MoveCursorCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/MoveCursorCmd.md#movecursorcmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`setSelection`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-setselection) |
| `data` | [`SetSelectionCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/SetSelectionCmd.md#setselectioncmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`selectWord`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-selectword) |
| `data` | [`SelectWordCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/SelectWordCmd.md#selectwordcmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`selectParagraph`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-selectparagraph) |
| `data` | [`SelectParagraphCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/SelectParagraphCmd.md#selectparagraphcmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`selectAllText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-selectalltext) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`insertNewLine`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-insertnewline) |
| `data` | [`InsertNewLineCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/InsertNewLineCmd.md#insertnewlinecmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`insertLineBrake`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-insertlinebrake) |
| `data` | [`InsertLineBrakeCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/InsertLineBrakeCmd.md#insertlinebrakecmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`insertTab`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-inserttab) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`insertText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-inserttext) |
| `data` | [`InsertTextCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/InsertTextCmd.md#inserttextcmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`deleteText`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-deletetext) |
| `data` | [`DeleteTextCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/DeleteTextCmd.md#deletetextcmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`copyToClipboard`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-copytoclipboard) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`clearFormatting`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-clearformatting) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`setCharStyle`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-setcharstyle) |
| `data` | [`SetCharStyleCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/SetCharStyleCmd.md#setcharstylecmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`setParagraphStyle`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-setparagraphstyle) |
| `data` | [`SetParagraphStyleCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/SetParagraphStyleCmd.md#setparagraphstylecmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`setCapitalLetters`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-setcapitalletters) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`setFontBold`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-setfontbold) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`setFontItalic`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-setfontitalic) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`setSuperscriptLetters`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-setsuperscriptletters) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`setSubscriptLetters`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-setsubscriptletters) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`setFontUnderline`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-setfontunderline) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data?): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`increaseFontSize`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-increasefontsize) |
| `data?` | [`IncreaseFontSizeCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IncreaseFontSizeCmd.md#increasefontsizecmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data?): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`decreaseFontSize`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-decreasefontsize) |
| `data?` | [`DecreaseFontSizeCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/DecreaseFontSizeCmd.md#decreasefontsizecmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`setAlignment`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-setalignment) |
| `data` | [`SetAlignmentCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/SetAlignmentCmd.md#setalignmentcmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`addListItem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-addlistitem) |
| `data` | [`AddListItemCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/AddListItemCmd.md#addlistitemcmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`creteBulletedListItem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-cretebulletedlistitem) |
| `data` | [`CreateBulletedListItemCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CreateBulletedListItemCmd.md#createbulletedlistitemcmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`creteBulletedListItem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-cretebulletedlistitem) |
| `data` | [`CreateNumberedListItemCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CreateNumberedListItemCmd.md#createnumberedlistitemcmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data?): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`deleteListItem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-deletelistitem) |
| `data?` | [`DeleteListItemCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/DeleteListItemCmd.md#deletelistitemcmddata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data?): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`increaseListItemIndent`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-increaselistitemindent) |
| `data?` | [`IncreaseListItemIndentData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IncreaseListItemIndentCmd.md#increaselistitemindentdata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data?): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`decreaseListItemIndent`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-decreaselistitemindent) |
| `data?` | [`DecreaseListItemIndentData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/DecreaseListItemIndentCmd.md#decreaselistitemindentdata) |

###### Returns

`void`

###### Inherited from

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

###### Call Signature

```ts
executeCommand(type, data): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`applyListItem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#enumeration-member-applylistitem) |
| `data` | [`ApplyListTypeCmdData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ApplyListTypeCmd.md#applylisttypecmddata) |

###### Returns

`void`

###### Inherited from

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

##### exitEditMode()

```ts
exitEditMode(): void;
```

Exits editing mode.

###### Returns

`void`

##### getFormattedText()

```ts
getFormattedText(): Promise<string>;
```

Returns formatted text.

###### Returns

`Promise`\<`string`\>

##### getInlineStyle()

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

##### getParagraphStyle()

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

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

##### isApplyingListsEnabled()

```ts
isApplyingListsEnabled(): boolean;
```

Indicates if applying lists is allowed.

###### Returns

`boolean`

##### isBulletedList()

```ts
isBulletedList(): boolean;
```

Indicates if the current paragraph or selected paragraphs are bulleted list.

###### Returns

`boolean`

##### isIndentationEnabled()

```ts
isIndentationEnabled(): boolean;
```

Indicates if indentation is allowed.

###### Returns

`boolean`

##### isIndentationHidden()

```ts
isIndentationHidden(): boolean;
```

Indicates if indentation is applyable.

###### Returns

`boolean`

##### isNumberedList()

```ts
isNumberedList(): boolean;
```

Indicates if the current paragraph or selected paragraphs are numbered list.

###### Returns

`boolean`

##### processKeyEvent()

```ts
processKeyEvent(e): Promise<boolean>;
```

Handles keyboard input events.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `e` | [`IKeyboardEvent`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IKeyboardEvent.md#ikeyboardevent) | keyboard event. |

###### Returns

`Promise`\<`boolean`\>

true if changes were made, false otherwise.

##### processMouseEvent()

```ts
processMouseEvent(e): void;
```

Handles mouse input events.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `e` | [`IMouseEvent`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IMouseEvent.md#imouseevent) | mouse event. |

###### Returns

`void`

##### processZoomChangedEvent()

```ts
processZoomChangedEvent(): Promise<boolean>;
```

Handles canvas zoom changed event.

###### Returns

`Promise`\<`boolean`\>

true if event was processed, false if the text editor is not ready yet.

##### redo()

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

Redoes an action.

###### Returns

`void`

##### redraw()

```ts
redraw(): void;
```

###### Returns

`void`

##### setFontRegistry()

```ts
setFontRegistry(fontRegistry): any;
```

###### Parameters

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

###### Returns

`any`

##### setInlineStyle()

```ts
setInlineStyle(style): Promise<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

`Promise`\<`void`\>

###### Remarks

only properties specified in the expected style are set.

##### setParagraphStyle()

```ts
setParagraphStyle(style): Promise<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

`Promise`\<`void`\>

###### Remarks

only properties specified in the expected style are set.

##### undo()

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

Undoes an action.

###### Returns

`void`

***

### ITextEditorElementHandler

#### Properties

##### textEditorDiv

```ts
textEditorDiv: HTMLElement;
```

##### textEditorInnerDiv

```ts
textEditorInnerDiv: HTMLElement;
```

#### Methods

##### addTextEditorStyles()

```ts
addTextEditorStyles(css): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `css` | `string` |

###### Returns

`void`

##### getTextEditorFormattedText()

```ts
getTextEditorFormattedText(): string;
```

###### Returns

`string`

##### hideTextEditor()

```ts
hideTextEditor(): any;
```

###### Returns

`any`

##### showTextEditor()

```ts
showTextEditor(
   rectangle, 
   textAlignment, 
   html, 
   borderWidth, 
   borderColor, 
   fillColor, 
   opacity, 
   verticalAlignment, 
   isVertical): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `rectangle` | `RotatedRectangleF` |
| `textAlignment` | `TextAlignment` |
| `html` | `string` |
| `borderWidth` | `number` |
| `borderColor` | `string` |
| `fillColor` | `string` |
| `opacity` | `number` |
| `verticalAlignment` | `TextVerticalAlignment` |
| `isVertical` | `boolean` |

###### Returns

`void`

## Type Aliases

### EditorInitData

```ts
type EditorInitData = object;
```

#### Properties

##### borderColor?

```ts
optional borderColor?: string;
```

##### borderWidth?

```ts
optional borderWidth?: number;
```

##### defaultInlineStyle?

```ts
optional defaultInlineStyle?: ICharStyle;
```

##### defaultParagraphStyle?

```ts
optional defaultParagraphStyle?: IParagraphStyle;
```

##### fillColor?

```ts
optional fillColor?: string;
```

##### isVertical?

```ts
optional isVertical?: boolean;
```

##### limits?

```ts
optional limits?: ITextLimits;
```

##### listSettings

```ts
listSettings: IListConfiguration;
```

##### newLineEnabled?

```ts
optional newLineEnabled?: boolean;
```

##### opacity?

```ts
optional opacity?: number;
```

##### point?

```ts
optional point?: IPoint;
```

##### previewScale?

```ts
optional previewScale?: number;
```

##### rectangle?

```ts
optional rectangle?: RotatedRectangleF;
```

##### text?

```ts
optional text?: string;
```

##### textAlignment?

```ts
optional textAlignment?: TextAlignment;
```

##### textFormattingEnabled?

```ts
optional textFormattingEnabled?: boolean;
```

##### textVerticalAlignment?

```ts
optional textVerticalAlignment?: TextVerticalAlignment;
```

##### transform?

```ts
optional transform?: Transform;
```
