Back to Website
Show / Hide Table of Contents

Class NewTextManager

Manager for performing basic operations with text.

Package: @aurigma/design-atoms-text
Remarks

The text manager works with the text engine only through the wrapper.

Constructors

(constructor)()

Constructs a new instance of the NewTextManager class

Declaration
constructor();

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.

cursorChangedEvent

Cursor change event.

Declaration
get cursorChangedEvent(): EventObject<IPositionInText>;
Property Value
Type Description
EventObject<IPositionInText>

Cursor change event.

Remarks

Reports the current cursor position.

isInitialized

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

s

Declaration
s: any;
Property Value
Type Description
any

selectionChangedEvent

Text selection change event.

Declaration
get selectionChangedEvent(): EventObject<ITextRange | null>;
Property Value
Type Description
EventObject<ITextRange | null>

Text selection change event.

Remarks

reports the currently selected text.

styleChangedEvent

Character or paragraph style change event.

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

Character or paragraph style change event.

textChangedEvent

Text content change event.

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

Text content change event.

Methods

actualizeStyleManager()

Declaration
actualizeStyleManager(): void;
Returns
Type Description
void

addListItem(currentParagraphIndex, previousListItemIndex)

Declaration
addListItem(currentParagraphIndex: number, previousListItemIndex: number): void;
Parameters
Type Name Description
number currentParagraphIndex
number previousListItemIndex
Returns
Type Description
void

applyListType(paragraphIndexes, listType)

Declaration
applyListType(paragraphIndexes: number[], listType: ListType): void;
Parameters
Type Name Description
number[] paragraphIndexes
ListType listType
Returns
Type Description
void

clearCurrentFormatting()

Declaration
clearCurrentFormatting(): void;
Returns
Type Description
void

createBulletedListItem(paragraphIndex, bulletCharCode)

Declaration
createBulletedListItem(paragraphIndex: number, bulletCharCode: number): void;
Parameters
Type Name Description
number paragraphIndex
number bulletCharCode
Returns
Type Description
void

createNumberedListItem(paragraphIndex, format)

Creates a new top-level numbered list item.

Declaration
createNumberedListItem(paragraphIndex: number, format: NumberingFormatType): void;
Parameters
Type Name Description
number paragraphIndex

paragraph index.

NumberingFormatType format

numbering format.

Returns
Type Description
void

decreaseListItemIndent(paragraphIndex)

Declaration
decreaseListItemIndent(paragraphIndex: number): void;
Parameters
Type Name Description
number paragraphIndex
Returns
Type Description
void

deleteAllText()

Declaration
deleteAllText(): void;
Returns
Type Description
void

deleteListItem(paragraphIndex)

Declaration
deleteListItem(paragraphIndex: number): void;
Parameters
Type Name Description
number paragraphIndex
Returns
Type Description
void

deleteTextByRange(textRange)

Declaration
deleteTextByRange(textRange: ITextRange): IPositionInText;
Parameters
Type Name Description
ITextRange textRange
Returns
Type Description
IPositionInText

deleteTextToDirection(direction)

Declaration
deleteTextToDirection(direction: MoveDirectionType): void;
Parameters
Type Name Description
MoveDirectionType direction
Returns
Type Description
void

detach()

Declaration
detach(): void;
Returns
Type Description
void

findItemToContinueBulletedList(paragraphIndex, bulletCharCode)

Declaration
findItemToContinueBulletedList(paragraphIndex: number, bulletCharCode: number): number | null;
Parameters
Type Name Description
number paragraphIndex
number bulletCharCode
Returns
Type Description
number | null

findItemToContinueNumberedList(paragraphIndex, format, itemNumber)

Declaration
findItemToContinueNumberedList(paragraphIndex: number, format: NumberingFormatType, itemNumber: number): number | null;
Parameters
Type Name Description
number paragraphIndex
NumberingFormatType format
number itemNumber
Returns
Type Description
number | null

getCharStyleForPosition(position)

Declaration
getCharStyleForPosition(position: IPositionInText): ICharStyle;
Parameters
Type Name Description
IPositionInText position
Returns
Type Description
ICharStyle

getCurrentCharStyle()

Declaration
getCurrentCharStyle(): ICharStyle | null;
Returns
Type Description
ICharStyle | null

getCurrentParagraphIndex()

Declaration
getCurrentParagraphIndex(): number;
Returns
Type Description
number

getCurrentParagraphLength()

Declaration
getCurrentParagraphLength(): number;
Returns
Type Description
number

getCurrentParagraphStyle()

Declaration
getCurrentParagraphStyle(): IParagraphStyle;
Returns
Type Description
IParagraphStyle

getCurrentPosition()

Declaration
getCurrentPosition(): IPositionInText;
Returns
Type Description
IPositionInText

getFirstPosition()

Declaration
getFirstPosition(): IPositionInText;
Returns
Type Description
IPositionInText

getFormattedText()

Declaration
getFormattedText(): string;
Returns
Type Description
string

getListItemStyle(paragraphIndex)

Declaration
getListItemStyle(paragraphIndex: number): IListStyle | null;
Parameters
Type Name Description
number paragraphIndex
Returns
Type Description
IListStyle | null

getParagraphCount()

Declaration
getParagraphCount(): number;
Returns
Type Description
number

getParagraphLength(index)

Declaration
getParagraphLength(index: number): number;
Parameters
Type Name Description
number index
Returns
Type Description
number

getParagraphStyleByIndex(index)

Declaration
getParagraphStyleByIndex(index: number): IParagraphStyle;
Parameters
Type Name Description
number index
Returns
Type Description
IParagraphStyle

getParagraphText(paragraphIndex)

Declaration
getParagraphText(paragraphIndex: any): ITextRange;
Parameters
Type Name Description
any paragraphIndex
Returns
Type Description
ITextRange

getSelectedParagraphIndexes()

Declaration
getSelectedParagraphIndexes(): number[];
Returns
Type Description
number[]

getSelectedTextRange()

Declaration
getSelectedTextRange(): ITextRange;
Returns
Type Description
ITextRange

getTextLength()

Declaration
getTextLength(): number;
Returns
Type Description
number

getTextModel()

Declaration
getTextModel(): Text;
Returns
Type Description
Text_2

getTextRangeByPositions(startPosition, endPosition)

Declaration
getTextRangeByPositions(startPosition: IPositionInText, endPosition: IPositionInText): ITextRange;
Parameters
Type Name Description
IPositionInText startPosition
IPositionInText endPosition
Returns
Type Description
ITextRange

increaseListItemIndent(paragraphIndex)

Declaration
increaseListItemIndent(paragraphIndex: number): void;
Parameters
Type Name Description
number paragraphIndex
Returns
Type Description
void

initialize(initData)

Declaration
initialize(initData: TextManagerInitData): void;
Parameters
Type Name Description
TextManagerInitData initData
Returns
Type Description
void

insertFormattedText(text)

Declaration
insertFormattedText(text: string): void;
Parameters
Type Name Description
string text
Returns
Type Description
void

insertNewLine()

Declaration
insertNewLine(): void;
Returns
Type Description
void

insertPlainText(text)

Declaration
insertPlainText(text: string): void;
Parameters
Type Name Description
string text
Returns
Type Description
void

isCaretOnEndOfParagraph()

Declaration
isCaretOnEndOfParagraph(): boolean;
Returns
Type Description
boolean

isCaretOnTheBeginingOfParagraph()

Declaration
isCaretOnTheBeginingOfParagraph(): boolean;
Returns
Type Description
boolean

isParagraphAListItem(paragraphIndex)

Declaration
isParagraphAListItem(paragraphIndex: number): boolean;
Parameters
Type Name Description
number paragraphIndex
Returns
Type Description
boolean

isParagraphsTheSameList(paragraphIndexes)

Declaration
isParagraphsTheSameList(paragraphIndexes: number[]): boolean;
Parameters
Type Name Description
number[] paragraphIndexes
Returns
Type Description
boolean

isSelectionCollapsed()

Declaration
isSelectionCollapsed(): boolean;
Returns
Type Description
boolean

measureText(scale, isExtendToBlackBox)

Declaration
measureText(scale: number, isExtendToBlackBox?: boolean): RectangleF;
Parameters
Type Name Description
number scale
boolean isExtendToBlackBox
Returns
Type Description
RectangleF

measureTextFrame(useActiveText)

Declaration
measureTextFrame(useActiveText: boolean): RectangleF;
Parameters
Type Name Description
boolean useActiveText
Returns
Type Description
RectangleF

moveCursorToDirection(direction, withSelection)

Declaration
moveCursorToDirection(direction: MoveDirectionType, withSelection?: boolean): void;
Parameters
Type Name Description
MoveDirectionType direction
boolean withSelection
Returns
Type Description
void

pauseUndoRedo()

Declaration
pauseUndoRedo(): void;
Returns
Type Description
void

redo()

Declaration
redo(): void;
Returns
Type Description
void

resetSelection()

Declaration
resetSelection(): void;
Returns
Type Description
void

resumeUndoRedo()

Declaration
resumeUndoRedo(): void;
Returns
Type Description
void

selectAllText()

Declaration
selectAllText(): void;
Returns
Type Description
void

selectCurrentParagraph()

Declaration
selectCurrentParagraph(): void;
Returns
Type Description
void

selectCurrentWord()

Declaration
selectCurrentWord(): void;
Returns
Type Description
void

setCharStyleForPosition(position, style)

Declaration
setCharStyleForPosition(position: IPositionInText, style: ICharStyle): void;
Parameters
Type Name Description
IPositionInText position
ICharStyle style
Returns
Type Description
void

setCurrentCharStyle(style)

Declaration
setCurrentCharStyle(style: ICharStyle): void;
Parameters
Type Name Description
ICharStyle style
Returns
Type Description
void

setCurrentParagraphStyle(style)

Declaration
setCurrentParagraphStyle(style: IParagraphStyle): void;
Parameters
Type Name Description
IParagraphStyle style
Returns
Type Description
void

setCursorToPoint(point)

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

setCursorToPosition(position)

Declaration
setCursorToPosition(position: IPositionInText): void;
Parameters
Type Name Description
IPositionInText position
Returns
Type Description
void

setParagraphStyleByIndex(index, style)

Declaration
setParagraphStyleByIndex(index: number, style: IParagraphStyle): void;
Parameters
Type Name Description
number index
IParagraphStyle style
Returns
Type Description
void

setSelection(startPoint, endPoint)

Declaration
setSelection(startPoint: IPoint, endPoint: IPoint): void;
Parameters
Type Name Description
IPoint startPoint
IPoint endPoint
Returns
Type Description
void

setTextModel(model)

Declaration
setTextModel(model: Text): void;
Parameters
Type Name Description
Text_2 model
Returns
Type Description
void

setWrappingPath(data)

Declaration
setWrappingPath(data: IWrappingPathData): void;
Parameters
Type Name Description
IWrappingPathData data
Returns
Type Description
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