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

# MobileTextEditor

> Executes a command of the specified type.

## Classes

### MobileTextEditor

#### Implements

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

#### Constructors

##### Constructor

```ts
new MobileTextEditor(
   elementHandler, 
   fontService, 
   useSimpleFontList, 
   inputTextValidator, 
   designAtomsApiClient, 
   colorPreviewService, 
   colorParser, 
   rgbColorParser): MobileTextEditor;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `elementHandler` | [`ITextEditorElementHandler`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextEditor.md#itexteditorelementhandler) |
| `fontService` | [`IFontService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IFontService.md#ifontservice) |
| `useSimpleFontList` | `boolean` |
| `inputTextValidator` | [`IInputTextValidator`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IInputTextValidator.md#iinputtextvalidator) |
| `designAtomsApiClient` | [`IDesignAtomsApiClient`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IDesignAtomsApiClient.md#idesignatomsapiclient) |
| `colorPreviewService` | [`IColorPreviewService`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IColorPreviewService.md#icolorpreviewservice) |
| `colorParser` | [`IColorParser`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IColorParser.md#icolorparser) |
| `rgbColorParser` | [`IRgbColorParser`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IRgbColorParser.md#irgbcolorparser) |

###### Returns

[`MobileTextEditor`](#mobiletexteditor)

#### Properties

##### editorInitialized

```ts
editorInitialized: any;
```

Editor initialization event.

###### Implementation of

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

##### styleChanged

```ts
styleChanged: any;
```

Character or paragraph style change event.

###### Implementation of

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

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

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

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

##### disableDrawBaseline

###### Get Signature

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

###### Returns

`boolean`

###### Implementation of

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

##### frameChanged

###### Get Signature

```ts
get frameChanged(): EventObject<RectangleF>;
```

Text frame change event.

###### Remarks

Reports the currently text frame.

###### Returns

`EventObject`\<`RectangleF`\>

Text frame change event.

###### Remarks

Reports the currently text frame.

###### Implementation of

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

##### highlightInEditingModeEnabled

###### Get Signature

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

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

###### Returns

`boolean`

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

###### Implementation of

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

##### invalidCharEntered

###### Get Signature

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

Invalid character input event.

###### Returns

`EventObject`\<`void`\>

Invalid character input event.

###### Implementation of

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

##### isActive

###### Get Signature

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

Indicates if the editor is in editing mode.

###### Returns

`boolean`

Indicates if the editor is in editing mode.

###### Implementation of

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

##### isReady

###### Get Signature

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

Indicates if the editor is initialized and ready to work.

###### Returns

`boolean`

Indicates if the editor is initialized and ready to work.

###### Implementation of

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

##### redrawActiveTextInEditMode

###### Get Signature

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

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

###### Returns

`boolean`

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

###### Implementation of

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

##### textLimits

###### Get Signature

```ts
get textLimits(): ITextLimits;
```

Get current text limits.

###### Returns

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

Get current text limits.

###### Implementation of

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

##### textLimitsViolationEvent

###### Get Signature

```ts
get textLimitsViolationEvent(): EventObject<ILimitsViolationEventData>;
```

###### Returns

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

###### Implementation of

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

##### textMetrics

###### Get Signature

```ts
get textMetrics(): ITextMetrics;
```

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

###### Returns

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

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

###### Implementation of

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

##### textMetricsChangedEvent

###### Get Signature

```ts
get textMetricsChangedEvent(): EventObject<ITextMetrics>;
```

###### Returns

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

###### Implementation of

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

#### Methods

##### dispose()

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

Disposes text editor when its no longer needed.

###### Returns

`void`

###### Implementation of

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

##### ensureFocus()

```ts
ensureFocus(): void;
```

###### Returns

`void`

##### enterEditMode()

```ts
enterEditMode(point?): Promise<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

`Promise`\<`void`\>

###### Implementation of

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

##### executeCommand()

```ts
executeCommand(commandType, initData?): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `commandType` | [`CommandType`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#commandtype) |
| `initData?` | `any` |

###### Returns

`void`

###### Implementation of

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

##### exitEditMode()

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

Exits editing mode.

###### Returns

`void`

###### Implementation of

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

##### getFormattedText()

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

Returns formatted text.

###### Returns

`Promise`\<`string`\>

###### Implementation of

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

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

###### Implementation of

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

##### getParagraphLength()

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

###### Parameters

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

###### Returns

`number`

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

###### Implementation of

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

##### getTextMetrics()

```ts
getTextMetrics(): TextMetrics;
```

###### Returns

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

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

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

##### initialize()

```ts
initialize(
   data, 
   colorPalette, 
   listStyleSheetManager): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `data` | [`EditorInitData`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextEditor.md#editorinitdata) |
| `colorPalette` | [`IColorPalette`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IColorPalette-1.md#icolorpalette) |
| `listStyleSheetManager` | [`IListStyleSheetManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/IListStyleSheetManager.md#iliststylesheetmanager) |

###### Returns

`void`

##### isApplyingListsEnabled()

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

Indicates if applying lists is allowed.

###### Returns

`boolean`

###### Implementation of

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

##### isBulletedList()

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

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

###### Returns

`boolean`

###### Implementation of

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

##### isIndentationEnabled()

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

Indicates if indentation is allowed.

###### Returns

`boolean`

###### Implementation of

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

##### isIndentationHidden()

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

Indicates if indentation is applyable.

###### Returns

`boolean`

###### Implementation of

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

##### isNumberedList()

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

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

###### Returns

`boolean`

###### Implementation of

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

##### processKeyEvent()

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

Handles keyboard input events.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `e` | `KeyboardEvent` | keyboard event. |

###### Returns

`Promise`\<`boolean`\>

true if changes were made, false otherwise.

###### Implementation of

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

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

###### Implementation of

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

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

###### Implementation of

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

##### redo()

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

Redoes an action.

###### Returns

`void`

###### Implementation of

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

##### redraw()

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

###### Returns

`void`

###### Implementation of

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

##### setFontRegistry()

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

###### Parameters

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

###### Returns

`void`

###### Implementation of

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

##### setInlineStyle()

```ts
setInlineStyle(value): Promise<void>;
```

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

###### Parameters

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

###### Returns

`Promise`\<`void`\>

###### Remarks

only properties specified in the expected style are set.

###### Implementation of

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

##### setParagraphStyle()

```ts
setParagraphStyle(value): Promise<void>;
```

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

###### Parameters

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

###### Returns

`Promise`\<`void`\>

###### Remarks

only properties specified in the expected style are set.

###### Implementation of

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

##### undo()

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

Undoes an action.

###### Returns

`void`

###### Implementation of

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