MobileTextEditor
Classes
MobileTextEditor
Executes a command of the specified type.
Implements
Constructors
Constructor
new MobileTextEditor(
elementHandler,
fontService,
useSimpleFontList,
inputTextValidator,
designAtomsApiClient,
colorPreviewService,
colorParser,
rgbColorParser): MobileTextEditor;
Parameters
| Parameter | Type |
|---|---|
elementHandler | ITextEditorElementHandler |
fontService | IFontService |
useSimpleFontList | boolean |
inputTextValidator | IInputTextValidator |
designAtomsApiClient | IDesignAtomsApiClient |
colorPreviewService | IColorPreviewService |
colorParser | IColorParser |
rgbColorParser | IRgbColorParser |
Returns
Properties
editorInitialized
editorInitialized: any;
Editor initialization event.
Implementation of
styleChanged
styleChanged: any;
Character or paragraph style change event.
Implementation of
Accessors
canRedo
Get Signature
get canRedo(): boolean;
Indicates if the action can be redone.
Returns
boolean
Indicates if the action can be redone.
Implementation of
canUndo
Get Signature
get canUndo(): boolean;
Indicates if the action can be undone.
Returns
boolean
Indicates if the action can be undone.
Implementation of
disableDrawBaseline
Get Signature
get disableDrawBaseline(): boolean;
Returns
boolean
Implementation of
ITextEditor.disableDrawBaseline
frameChanged
Get Signature
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
highlightInEditingModeEnabled
Get Signature
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.highlightInEditingModeEnabled
invalidCharEntered
Get Signature
get invalidCharEntered(): EventObject<void>;
Invalid character input event.
Returns
EventObject<void>
Invalid character input event.
Implementation of
ITextEditor.invalidCharEntered
isActive
Get Signature
get isActive(): boolean;
Indicates if the editor is in editing mode.
Returns
boolean
Indicates if the editor is in editing mode.
Implementation of
isReady
Get Signature
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
redrawActiveTextInEditMode
Get Signature
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.redrawActiveTextInEditMode
textLimits
Get Signature
get textLimits(): ITextLimits;
Get current text limits.
Returns
Get current text limits.
Implementation of
textLimitsViolationEvent
Get Signature
get textLimitsViolationEvent(): EventObject<ILimitsViolationEventData>;
Returns
EventObject<ILimitsViolationEventData>
Implementation of
ITextEditor.textLimitsViolationEvent
textMetrics
Get Signature
get textMetrics(): ITextMetrics;
Get current text data: characters count, paragraphs count, current paragraph characters count.
Returns
Get current text data: characters count, paragraphs count, current paragraph characters count.
Implementation of
textMetricsChangedEvent
Get Signature
get textMetricsChangedEvent(): EventObject<ITextMetrics>;
Returns
EventObject<ITextMetrics>
Implementation of
ITextEditor.textMetricsChangedEvent
Methods
dispose()
dispose(): void;
Disposes text editor when its no longer needed.
Returns
void
Implementation of
ensureFocus()
ensureFocus(): void;
Returns
void
enterEditMode()
enterEditMode(point?): Promise<void>;
Enters the editing mode.
Parameters
| Parameter | Type | Description |
|---|---|---|
point? | IPoint | cursor point. |
Returns
Promise<void>
Implementation of
executeCommand()
executeCommand(commandType, initData?): void;
Parameters
| Parameter | Type |
|---|---|
commandType | CommandType |
initData? | any |
Returns
void
Implementation of
exitEditMode()
exitEditMode(): void;
Exits editing mode.
Returns
void
Implementation of
getFormattedText()
getFormattedText(): Promise<string>;
Returns formatted text.
Returns
Promise<string>
Implementation of
getInlineStyle()
getInlineStyle(): ICharStyle;
Returns the character style for the current cursor position or the starting position of the selected text.
Returns
Implementation of
getParagraphLength()
getParagraphLength(index): number;
Parameters
| Parameter | Type |
|---|---|
index | number |
Returns
number
getParagraphStyle()
getParagraphStyle(): IParagraphStyle;
Returns the paragraph style for the current cursor position or the first paragraph of the selected text.
Returns
Implementation of
getTextMetrics()
getTextMetrics(): TextMetrics;
Returns
getTextModel()
getTextModel(): Text;
Returns the text model.
Returns
Implementation of
initialize()
initialize(
data,
colorPalette,
listStyleSheetManager): void;
Parameters
| Parameter | Type |
|---|---|
data | EditorInitData |
colorPalette | IColorPalette |
listStyleSheetManager | IListStyleSheetManager |
Returns
void
isApplyingListsEnabled()
isApplyingListsEnabled(): boolean;
Indicates if applying lists is allowed.
Returns
boolean
Implementation of
ITextEditor.isApplyingListsEnabled
isBulletedList()
isBulletedList(): boolean;
Indicates if the current paragraph or selected paragraphs are bulleted list.
Returns
boolean
Implementation of
isIndentationEnabled()
isIndentationEnabled(): boolean;
Indicates if indentation is allowed.
Returns
boolean
Implementation of
ITextEditor.isIndentationEnabled
isIndentationHidden()
isIndentationHidden(): boolean;
Indicates if indentation is applyable.
Returns
boolean
Implementation of
ITextEditor.isIndentationHidden
isNumberedList()
isNumberedList(): boolean;
Indicates if the current paragraph or selected paragraphs are numbered list.
Returns
boolean
Implementation of
processKeyEvent()
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
processMouseEvent()
processMouseEvent(e): void;
Handles mouse input events.
Parameters
| Parameter | Type | Description |
|---|---|---|
e | IMouseEvent | mouse event. |
Returns
void
Implementation of
processZoomChangedEvent()
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.processZoomChangedEvent
redo()
redo(): void;
Redoes an action.
Returns
void
Implementation of
redraw()
redraw(): void;
Returns
void
Implementation of
setFontRegistry()
setFontRegistry(fontRegistry): void;
Parameters
| Parameter | Type |
|---|---|
fontRegistry | IFontRegistry |
Returns
void
Implementation of
setInlineStyle()
setInlineStyle(value): Promise<void>;
Sets the character style for the current cursor position or selected text.
Parameters
| Parameter | Type |
|---|---|
value | ICharStyle |
Returns
Promise<void>
Remarks
only properties specified in the expected style are set.
Implementation of
setParagraphStyle()
setParagraphStyle(value): Promise<void>;
Sets the paragraph style for the current cursor position or selected text.
Parameters
| Parameter | Type |
|---|---|
value | IParagraphStyle |
Returns
Promise<void>
Remarks
only properties specified in the expected style are set.
Implementation of
undo()
undo(): void;
Undoes an action.
Returns
void