Back to Website
Show / Hide Table of Contents

Class NewTextEditor

In-place text editor.

Package: @aurigma/design-atoms-text
Remarks

A text editor works with a text engine only through a text manager.

Constructors

(constructor)(_clipboard, _inputTextValidator, _fontRegistry, _renderer)

Constructs a new instance of the NewTextEditor class

Declaration
constructor(_clipboard: IClipboard, _inputTextValidator: IInputTextValidator, _fontRegistry: IFontRegistry, _renderer: ITextEditorRenderer);
Parameters
Type Name Description
IClipboard _clipboard
IInputTextValidator _inputTextValidator
IFontRegistry _fontRegistry
ITextEditorRenderer _renderer

Properties

canRedo

Indicates if the action can be redone.

Declaration
get canRedo(): boolean;
Property Value
Type Description
boolean

Indicates if the action can be redone.

canUndo

Indicates if the action can be undone.

Declaration
get canUndo(): boolean;
Property Value
Type Description
boolean

Indicates if the action can be undone.

disableDrawBaseline

Declaration
get disableDrawBaseline(): boolean;
Property Value
Type Description
boolean

editorInitialized

Editor initialization event.

Declaration
get editorInitialized(): EventObject<void>;
Property Value
Type Description
EventObject<void>

Editor initialization event.

frameChanged

Text frame change event.

Declaration
get 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
get 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
get invalidCharEntered(): EventObject<void>;
Property Value
Type Description
EventObject<void>

Invalid character input event.

isActive

Indicates if the editor is in editing mode.

Declaration
get 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
get 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
get redrawActiveTextInEditMode(): boolean;
Property Value
Type Description
boolean

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

renderer

Returns a text editor renderer.

Declaration
get renderer(): ITextEditorRenderer;
Property Value
Type Description
ITextEditorRenderer

Returns a text editor renderer.

styleChanged

Character or paragraph style change event.

Declaration
get styleChanged(): EventObject<void>;
Property Value
Type Description
EventObject<void>

Character or paragraph style change event.

textLimits

Declaration
get textLimits(): ITextLimits;
Property Value
Type Description
ITextLimits

textLimitsViolationEvent

Declaration
get textLimitsViolationEvent(): EventObject<ILimitsViolationEventData>;
Property Value
Type Description
EventObject<ILimitsViolationEventData>

textMetrics

Declaration
get textMetrics(): ITextMetrics;
Property Value
Type Description
ITextMetrics

textMetricsChangedEvent

Declaration
get textMetricsChangedEvent(): EventObject<ITextMetrics>;
Property Value
Type Description
EventObject<ITextMetrics>

Methods

dispose()

Declaration
dispose(): void;
Returns
Type Description
void

enterEditMode(point)

Declaration
enterEditMode(point: IPoint): void;
Parameters
Type Name Description
IPoint point
Returns
Type Description
void

executeCommand(commandType, initData)

Executes a command of the specified type.

Declaration
executeCommand(commandType: CommandType, initData?: any): void;
Parameters
Type Name Description
CommandType commandType

type of command.

any initData

data required to initialize the command.

Returns
Type Description
void

exitEditMode()

Declaration
exitEditMode(): void;
Returns
Type Description
void

getFormattedText()

Declaration
getFormattedText(): Promise<string>;
Returns
Type Description
Promise<string>

getInlineStyle()

Declaration
getInlineStyle(): ICharStyle;
Returns
Type Description
ICharStyle

getParagraphStyle()

Declaration
getParagraphStyle(): IParagraphStyle;
Returns
Type Description
IParagraphStyle

getTextModel()

Declaration
getTextModel(): Text;
Returns
Type Description
Text_2

initialize(tw, itemData, listStyleSheetManager)

Initializes the text editor.

Declaration
initialize(tw: ITextEngineWrapper, itemData: TextEditorInitData, listStyleSheetManager: IListStyleSheetManager): void;
Parameters
Type Name Description
ITextEngineWrapper tw

text engine.

TextEditorInitData itemData

text item data.

IListStyleSheetManager listStyleSheetManager

style manager for lists.

Returns
Type Description
void

isApplyingListsEnabled()

Declaration
isApplyingListsEnabled(): boolean;
Returns
Type Description
boolean

isBulletedList()

Declaration
isBulletedList(): boolean;
Returns
Type Description
boolean

isIndentationEnabled()

Declaration
isIndentationEnabled(): boolean;
Returns
Type Description
boolean

isIndentationHidden()

Declaration
isIndentationHidden(): boolean;
Returns
Type Description
boolean

isNumberedList()

Declaration
isNumberedList(): boolean;
Returns
Type Description
boolean

processKeyEvent(e)

Declaration
processKeyEvent(e: IKeyboardEvent): Promise<boolean>;
Parameters
Type Name Description
IKeyboardEvent e
Returns
Type Description
Promise<boolean>

processMouseEvent(e)

Declaration
processMouseEvent(e: IMouseEvent): boolean;
Parameters
Type Name Description
IMouseEvent e
Returns
Type Description
boolean

processZoomChangedEvent()

Declaration
processZoomChangedEvent(): Promise<boolean>;
Returns
Type Description
Promise<boolean>

redo()

Declaration
redo(): void;
Returns
Type Description
void

redraw()

Declaration
redraw(): boolean;
Returns
Type Description
boolean

setFontRegistry(fontRegistry)

Declaration
setFontRegistry(fontRegistry: IFontRegistry): void;
Parameters
Type Name Description
IFontRegistry fontRegistry
Returns
Type Description
void

setInlineStyle(style)

Declaration
setInlineStyle(style: ICharStyle): Promise<void>;
Parameters
Type Name Description
ICharStyle style
Returns
Type Description
Promise<void>

setParagraphStyle(style)

Declaration
setParagraphStyle(style: IParagraphStyle): Promise<void>;
Parameters
Type Name Description
IParagraphStyle style
Returns
Type Description
Promise<void>

undo()

Declaration
undo(): void;
Returns
Type Description
void
Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2024 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback