Class TextWhizzWrapper
A text engine wrapper for editing and measuring text.
Package: @aurigma/design-atoms-text
Remarks
The TextWhizz is used as a text engine.
Constructors
(constructor)(_engine, _fontRegistry, _listStyleSheetManager, _colorPreviewService, _colorParser, _dpi)
Constructs a new instance of the TextWhizzWrapper
class
Declaration
constructor(_engine: typeof TextWhizz, _fontRegistry: TextWhizz.FontRegistry, _listStyleSheetManager: IListStyleSheetManager, _colorPreviewService: IColorPreviewService, _colorParser: IColorParser, _dpi?: number);
Parameters
Type | Name | Description |
---|---|---|
typeof TextWhizz | _engine | |
TextWhizz.FontRegistry | _fontRegistry | |
IListStyleSheetManager | _listStyleSheetManager | |
IColorPreviewService | _colorPreviewService | |
IColorParser | _colorParser | |
number | _dpi |
Properties
colorPalette
Color palette.
Declaration
get colorPalette(): IColorPalette;
Property Value
Type | Description |
---|---|
IColorPalette | Color palette. |
cursorHandler
Handler for performing simple operations with the cursor.
Declaration
get cursorHandler(): ICursorHandler;
Property Value
Type | Description |
---|---|
ICursorHandler | Handler for performing simple operations with the cursor. |
engine
Text engine.
Declaration
get engine(): typeof TextWhizz;
Property Value
Type | Description |
---|---|
typeof TextWhizz | Text engine. |
engineHandler
The engine's text handler.
Declaration
get engineHandler(): TextWhizz.TextHandler;
Property Value
Type | Description |
---|---|
TextWhizz.TextHandler | The engine's text handler. |
initData
Text item data for initialization.
Declaration
get initData(): ITextWhizzInitData;
Property Value
Type | Description |
---|---|
ITextWhizzInitData | Text item data for initialization. |
isInitialized
Indicates if the text engine wrapper is initialized and ready to work.
Declaration
get isInitialized(): boolean;
Property Value
Type | Description |
---|---|
boolean | Indicates if the text engine wrapper is initialized and ready to work. |
metadataHandler
Handler for performing simple operations with text metadata.
Declaration
get metadataHandler(): IMetadataHandler;
Property Value
Type | Description |
---|---|
IMetadataHandler | Handler for performing simple operations with text metadata. |
selectionHandler
Handler for performing simple operations with text selection.
Declaration
get selectionHandler(): ISelectionHandler;
Property Value
Type | Description |
---|---|
ISelectionHandler | Handler for performing simple operations with text selection. |
styleHandler
Handler for performing simple operations with paragraph and character styles.
Declaration
get styleHandler(): IStyleHandler;
Property Value
Type | Description |
---|---|
IStyleHandler | Handler for performing simple operations with paragraph and character styles. |
textHandler
Handler for performing simple operations with text content.
Declaration
get textHandler(): ITextHandler;
Property Value
Type | Description |
---|---|
ITextHandler | Handler for performing simple operations with text content. |
textMeasurer
Handler for measuring text.
Declaration
get textMeasurer(): ITextMeasurer;
Property Value
Type | Description |
---|---|
ITextMeasurer | Handler for measuring text. |
undoRedoHandler
Handler for performing operations with redoing and undoing of actions.
Declaration
get undoRedoHandler(): IUndoRedoHandler;
Property Value
Type | Description |
---|---|
IUndoRedoHandler | Handler for performing operations with redoing and undoing of actions. |
Methods
clone(text)
Declaration
clone(text: string): ITextWhizzHolder;
Parameters
Type | Name | Description |
---|---|---|
string | text |
Returns
Type | Description |
---|---|
ITextWhizzHolder |
createException(engine, e)
Handles the exception of TextWhizz.
Declaration
static createException(engine: typeof TextWhizz, e: number): Exception;
Parameters
Type | Name | Description |
---|---|---|
typeof TextWhizz | engine |
text engine. |
number | e |
number of TextWhizz exception. |
Returns
Type | Description |
---|---|
Exception | a handled exception with a name and description. |
initialize(itemData)
Initializes the text engine wrapper.
Declaration
initialize(itemData: ITextWhizzInitData): void;
Parameters
Type | Name | Description |
---|---|---|
ITextWhizzInitData | itemData |
text item data for initialization. |
Returns
Type | Description |
---|---|
void |