Skip to main content

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
ParameterType
elementHandlerITextEditorElementHandler
fontServiceIFontService
useSimpleFontListboolean
inputTextValidatorIInputTextValidator
designAtomsApiClientIDesignAtomsApiClient
colorPreviewServiceIColorPreviewService
colorParserIColorParser
rgbColorParserIRgbColorParser
Returns

MobileTextEditor

Properties

editorInitialized
editorInitialized: any;

Editor initialization event.

Implementation of

ITextEditor.editorInitialized

styleChanged
styleChanged: any;

Character or paragraph style change event.

Implementation of

ITextEditor.styleChanged

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

ITextEditor.canRedo

canUndo
Get Signature
get canUndo(): boolean;

Indicates if the action can be undone.

Returns

boolean

Indicates if the action can be undone.

Implementation of

ITextEditor.canUndo

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

ITextEditor.frameChanged

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

ITextEditor.isActive

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

ITextEditor.isReady

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

ITextLimits

Get current text limits.

Implementation of

ITextEditor.textLimits

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

ITextMetrics

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

Implementation of

ITextEditor.textMetrics

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

ITextEditor.dispose

ensureFocus()
ensureFocus(): void;
Returns

void

enterEditMode()
enterEditMode(point?): Promise<void>;

Enters the editing mode.

Parameters
ParameterTypeDescription
point?IPointcursor point.
Returns

Promise<void>

Implementation of

ITextEditor.enterEditMode

executeCommand()
executeCommand(commandType, initData?): void;
Parameters
ParameterType
commandTypeCommandType
initData?any
Returns

void

Implementation of

ITextEditor.executeCommand

exitEditMode()
exitEditMode(): void;

Exits editing mode.

Returns

void

Implementation of

ITextEditor.exitEditMode

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

Returns formatted text.

Returns

Promise<string>

Implementation of

ITextEditor.getFormattedText

getInlineStyle()
getInlineStyle(): ICharStyle;

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

Returns

ICharStyle

Implementation of

ITextEditor.getInlineStyle

getParagraphLength()
getParagraphLength(index): number;
Parameters
ParameterType
indexnumber
Returns

number

getParagraphStyle()
getParagraphStyle(): IParagraphStyle;

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

Returns

IParagraphStyle

Implementation of

ITextEditor.getParagraphStyle

getTextMetrics()
getTextMetrics(): TextMetrics;
Returns

TextMetrics

getTextModel()
getTextModel(): Text;

Returns the text model.

Returns

Text

Implementation of

ITextEditor.getTextModel

initialize()
initialize(
data,
colorPalette,
listStyleSheetManager): void;
Parameters
ParameterType
dataEditorInitData
colorPaletteIColorPalette
listStyleSheetManagerIListStyleSheetManager
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

ITextEditor.isBulletedList

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

ITextEditor.isNumberedList

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

Handles keyboard input events.

Parameters
ParameterTypeDescription
eKeyboardEventkeyboard event.
Returns

Promise<boolean>

true if changes were made, false otherwise.

Implementation of

ITextEditor.processKeyEvent

processMouseEvent()
processMouseEvent(e): void;

Handles mouse input events.

Parameters
ParameterTypeDescription
eIMouseEventmouse event.
Returns

void

Implementation of

ITextEditor.processMouseEvent

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

ITextEditor.redo

redraw()
redraw(): void;
Returns

void

Implementation of

ITextEditor.redraw

setFontRegistry()
setFontRegistry(fontRegistry): void;
Parameters
ParameterType
fontRegistryIFontRegistry
Returns

void

Implementation of

ITextEditor.setFontRegistry

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

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

Parameters
ParameterType
valueICharStyle
Returns

Promise<void>

Remarks

only properties specified in the expected style are set.

Implementation of

ITextEditor.setInlineStyle

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

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

Parameters
ParameterType
valueIParagraphStyle
Returns

Promise<void>

Remarks

only properties specified in the expected style are set.

Implementation of

ITextEditor.setParagraphStyle

undo()
undo(): void;

Undoes an action.

Returns

void

Implementation of

ITextEditor.undo

Was this page helpful?