Interface ITextEditor
Inheritance
Package: @aurigma/design-atoms-text
Properties
canRedo
Indicates if the action can be redone.
Declaration
canRedo: boolean;
Property Value
Type | Description |
---|---|
boolean | Indicates if the action can be redone. |
canUndo
Indicates if the action can be undone.
Declaration
canUndo: boolean;
Property Value
Type | Description |
---|---|
boolean | Indicates if the action can be undone. |
disableDrawBaseline
Declaration
disableDrawBaseline: boolean;
Property Value
Type | Description |
---|---|
boolean |
editorInitialized
Editor initialization event.
Declaration
editorInitialized: EventObject<void>;
Property Value
Type | Description |
---|---|
EventObject<void> | Editor initialization event. |
frameChanged
Text frame change event.
Declaration
frameChanged: EventObject<RectangleF>;
Property Value
Type | Description |
---|---|
EventObject<RectangleF> | Text frame change event. |
Remarks
Reports the currently text frame.
highlightInEditingModeEnabled
Indicates if the editor has to be highlighted when in editing mode.
Declaration
highlightInEditingModeEnabled: boolean;
Property Value
Type | Description |
---|---|
boolean | Indicates if the editor has to be highlighted when in editing mode. |
invalidCharEntered
Invalid character input event.
Declaration
invalidCharEntered: EventObject<void>;
Property Value
Type | Description |
---|---|
EventObject<void> | Invalid character input event. |
isActive
Indicates if the editor is in editing mode.
Declaration
isActive: boolean;
Property Value
Type | Description |
---|---|
boolean | Indicates if the editor is in editing mode. |
isReady
Indicates if the editor is initialized and ready to work.
Declaration
isReady: boolean;
Property Value
Type | Description |
---|---|
boolean | Indicates if the editor is initialized and ready to work. |
redrawActiveTextInEditMode
Indicates if the editor needs to redraw ActiveText when it is edited.
Declaration
redrawActiveTextInEditMode: boolean;
Property Value
Type | Description |
---|---|
boolean | Indicates if the editor needs to redraw ActiveText when it is edited. |
styleChanged
Character or paragraph style change event.
Declaration
styleChanged: EventObject<void>;
Property Value
Type | Description |
---|---|
EventObject<void> | Character or paragraph style change event. |
textLimits
Get current text limits.
Declaration
textLimits: ITextLimits;
Property Value
Type | Description |
---|---|
ITextLimits | Get current text limits. |
textLimitsViolationEvent
Declaration
textLimitsViolationEvent: EventObject<ILimitsViolationEventData>;
Property Value
Type | Description |
---|---|
EventObject<ILimitsViolationEventData> |
textMetrics
Get current text data: characters count, paragraphs count, current paragraph characters count.
Declaration
textMetrics: ITextMetrics;
Property Value
Type | Description |
---|---|
ITextMetrics | Get current text data: characters count, paragraphs count, current paragraph characters count. |
textMetricsChangedEvent
Declaration
textMetricsChangedEvent: EventObject<ITextMetrics>;
Property Value
Type | Description |
---|---|
EventObject<ITextMetrics> |
Methods
dispose()
Disposes text editor when its no longer needed.
Declaration
dispose(): void;
Returns
Type | Description |
---|---|
void |
enterEditMode(point)
Enters the editing mode.
Declaration
enterEditMode(point: IPoint): void;
Parameters
Type | Name | Description |
---|---|---|
IPoint | point |
cursor point. |
Returns
Type | Description |
---|---|
void |
exitEditMode()
Exits editing mode.
Declaration
exitEditMode(): void;
Returns
Type | Description |
---|---|
void |
getFormattedText()
Returns formatted text.
Declaration
getFormattedText(): Promise<string>;
Returns
Type | Description |
---|---|
Promise<string> |
getInlineStyle()
Returns the character style for the current cursor position or the starting position of the selected text.
Declaration
getInlineStyle(): ICharStyle | null;
Returns
Type | Description |
---|---|
ICharStyle | null |
getParagraphStyle()
Returns the paragraph style for the current cursor position or the first paragraph of the selected text.
Declaration
getParagraphStyle(): IParagraphStyle;
Returns
Type | Description |
---|---|
IParagraphStyle |
getTextModel()
Returns the text model.
Declaration
getTextModel(): Text;
Returns
Type | Description |
---|---|
Text_2 |
isApplyingListsEnabled()
Indicates if applying lists is allowed.
Declaration
isApplyingListsEnabled(): boolean;
Returns
Type | Description |
---|---|
boolean |
isBulletedList()
Indicates if the current paragraph or selected paragraphs are bulleted list.
Declaration
isBulletedList(): boolean;
Returns
Type | Description |
---|---|
boolean |
isIndentationEnabled()
Indicates if indentation is allowed.
Declaration
isIndentationEnabled(): boolean;
Returns
Type | Description |
---|---|
boolean |
isIndentationHidden()
Indicates if indentation is applyable.
Declaration
isIndentationHidden(): boolean;
Returns
Type | Description |
---|---|
boolean |
isNumberedList()
Indicates if the current paragraph or selected paragraphs are numbered list.
Declaration
isNumberedList(): boolean;
Returns
Type | Description |
---|---|
boolean |
processKeyEvent(e)
Handles keyboard input events.
Declaration
processKeyEvent(e: IKeyboardEvent): Promise<boolean>;
Parameters
Type | Name | Description |
---|---|---|
IKeyboardEvent | e |
keyboard event. |
Returns
Type | Description |
---|---|
Promise<boolean> | true if changes were made, false otherwise. |
processMouseEvent(e)
Handles mouse input events.
Declaration
processMouseEvent(e: IMouseEvent): void;
Parameters
Type | Name | Description |
---|---|---|
IMouseEvent | e |
mouse event. |
Returns
Type | Description |
---|---|
void |
processZoomChangedEvent()
Handles canvas zoom changed event.
Declaration
processZoomChangedEvent(): Promise<boolean>;
Returns
Type | Description |
---|---|
Promise<boolean> | true if event was processed, false if the text editor is not ready yet. |
redo()
Redoes an action.
Declaration
redo(): void;
Returns
Type | Description |
---|---|
void |
redraw()
Declaration
redraw(): void;
Returns
Type | Description |
---|---|
void |
setFontRegistry(fontRegistry)
Declaration
setFontRegistry(fontRegistry: IFontRegistry): any;
Parameters
Type | Name | Description |
---|---|---|
IFontRegistry | fontRegistry |
Returns
Type | Description |
---|---|
any |
setInlineStyle(style)
Sets the character style for the current cursor position or selected text.
Declaration
setInlineStyle(style: ICharStyle): Promise<void>;
Parameters
Type | Name | Description |
---|---|---|
ICharStyle | style |
expected character style. |
Returns
Type | Description |
---|---|
Promise<void> |
Remarks
only properties specified in the expected style are set.
setParagraphStyle(style)
Sets the paragraph style for the current cursor position or selected text.
Declaration
setParagraphStyle(style: IParagraphStyle): Promise<void>;
Parameters
Type | Name | Description |
---|---|---|
IParagraphStyle | style |
expected paragraph style. |
Returns
Type | Description |
---|---|
Promise<void> |
Remarks
only properties specified in the expected style are set.
undo()
Undoes an action.
Declaration
undo(): void;
Returns
Type | Description |
---|---|
void |