Class NewTextManager
Manager for performing basic operations with text.
Constructors
(constructor)()
Constructs a new instance of the NewTextManager
class
Declaration
Properties
canRedo
Indicates if the action can be redone.
Declaration
Property Value
Type |
Description |
boolean |
Indicates if the action can be redone.
|
canUndo
Indicates if the action can be undone.
Declaration
Property Value
Type |
Description |
boolean |
Indicates if the action can be undone.
|
cursorChangedEvent
Declaration
get cursorChangedEvent(): EventObject<IPositionInText>;
Property Value
isInitialized
Declaration
get isInitialized(): boolean;
Property Value
s
Declaration
Property Value
selectionChangedEvent
Text selection change event.
Declaration
get selectionChangedEvent(): EventObject<ITextRange | null>;
Property Value
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
addListItem(currentParagraphIndex, previousListItemIndex)
Declaration
addListItem(currentParagraphIndex: number, previousListItemIndex: number): void;
Parameters
Type |
Name |
Description |
number |
currentParagraphIndex |
|
number |
previousListItemIndex |
|
Returns
applyListType(paragraphIndexes, listType)
Declaration
applyListType(paragraphIndexes: number[], listType: ListType): void;
Parameters
Type |
Name |
Description |
number[] |
paragraphIndexes |
|
ListType |
listType |
|
Returns
clearCurrentFormatting()
Declaration
clearCurrentFormatting(): void;
Returns
createBulletedListItem(paragraphIndex, bulletCharCode)
Declaration
createBulletedListItem(paragraphIndex: number, bulletCharCode: number): void;
Parameters
Type |
Name |
Description |
number |
paragraphIndex |
|
number |
bulletCharCode |
|
Returns
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
decreaseListItemIndent(paragraphIndex)
Declaration
decreaseListItemIndent(paragraphIndex: number): void;
Parameters
Type |
Name |
Description |
number |
paragraphIndex |
|
Returns
deleteAllText()
Declaration
Returns
deleteListItem(paragraphIndex)
Declaration
deleteListItem(paragraphIndex: number): void;
Parameters
Type |
Name |
Description |
number |
paragraphIndex |
|
Returns
deleteTextByRange(textRange)
Declaration
deleteTextByRange(textRange: ITextRange): IPositionInText;
Parameters
Returns
deleteTextToDirection(direction)
Declaration
deleteTextToDirection(direction: MoveDirectionType): void;
Parameters
Returns
detach()
Declaration
Returns
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
Returns
Type |
Description |
number | null |
|
getCharStyleForPosition(position)
Declaration
getCharStyleForPosition(position: IPositionInText): ICharStyle;
Parameters
Returns
getCurrentCharStyle()
Declaration
getCurrentCharStyle(): ICharStyle | null;
Returns
getCurrentParagraphIndex()
Declaration
getCurrentParagraphIndex(): number;
Returns
getCurrentParagraphLength()
Declaration
getCurrentParagraphLength(): number;
Returns
getCurrentParagraphStyle()
Declaration
getCurrentParagraphStyle(): IParagraphStyle;
Returns
getCurrentPosition()
Declaration
getCurrentPosition(): IPositionInText;
Returns
getFirstPosition()
Declaration
getFirstPosition(): IPositionInText;
Returns
getFormattedText()
Declaration
getFormattedText(): string;
Returns
getListItemStyle(paragraphIndex)
Declaration
getListItemStyle(paragraphIndex: number): IListStyle | null;
Parameters
Type |
Name |
Description |
number |
paragraphIndex |
|
Returns
getParagraphCount()
Declaration
getParagraphCount(): number;
Returns
getParagraphLength(index)
Declaration
getParagraphLength(index: number): number;
Parameters
Type |
Name |
Description |
number |
index |
|
Returns
getParagraphStyleByIndex(index)
Declaration
getParagraphStyleByIndex(index: number): IParagraphStyle;
Parameters
Type |
Name |
Description |
number |
index |
|
Returns
getParagraphText(paragraphIndex)
Declaration
getParagraphText(paragraphIndex: any): ITextRange;
Parameters
Type |
Name |
Description |
any |
paragraphIndex |
|
Returns
getSelectedParagraphIndexes()
Declaration
getSelectedParagraphIndexes(): number[];
Returns
Type |
Description |
number[] |
|
Declaration
getSelectedTextRange(): ITextRange;
Returns
getTextLength()
Declaration
Returns
getTextModel()
Declaration
Returns
Declaration
getTextRangeByPositions(startPosition: IPositionInText, endPosition: IPositionInText): ITextRange;
Parameters
Returns
increaseListItemIndent(paragraphIndex)
Declaration
increaseListItemIndent(paragraphIndex: number): void;
Parameters
Type |
Name |
Description |
number |
paragraphIndex |
|
Returns
initialize(initData)
Declaration
initialize(initData: TextManagerInitData): void;
Parameters
Returns
insertFormattedText(text)
Declaration
insertFormattedText(text: string): void;
Parameters
Type |
Name |
Description |
string |
text |
|
Returns
insertNewLine()
Declaration
Returns
insertPlainText(text)
Declaration
insertPlainText(text: string): void;
Parameters
Type |
Name |
Description |
string |
text |
|
Returns
isCaretOnEndOfParagraph()
Declaration
isCaretOnEndOfParagraph(): boolean;
Returns
isCaretOnTheBeginingOfParagraph()
Declaration
isCaretOnTheBeginingOfParagraph(): boolean;
Returns
isParagraphAListItem(paragraphIndex)
Declaration
isParagraphAListItem(paragraphIndex: number): boolean;
Parameters
Type |
Name |
Description |
number |
paragraphIndex |
|
Returns
isParagraphsTheSameList(paragraphIndexes)
Declaration
isParagraphsTheSameList(paragraphIndexes: number[]): boolean;
Parameters
Type |
Name |
Description |
number[] |
paragraphIndexes |
|
Returns
isSelectionCollapsed()
Declaration
isSelectionCollapsed(): boolean;
Returns
measureText(scale, isExtendToBlackBox)
Declaration
measureText(scale: number, isExtendToBlackBox?: boolean): RectangleF;
Parameters
Type |
Name |
Description |
number |
scale |
|
boolean |
isExtendToBlackBox |
|
Returns
measureTextFrame(useActiveText)
Declaration
measureTextFrame(useActiveText: boolean): RectangleF;
Parameters
Type |
Name |
Description |
boolean |
useActiveText |
|
Returns
moveCursorToDirection(direction, withSelection)
Declaration
moveCursorToDirection(direction: MoveDirectionType, withSelection?: boolean): void;
Parameters
Returns
pauseUndoRedo()
Declaration
Returns
redo()
Declaration
Returns
resetSelection()
Declaration
Returns
resumeUndoRedo()
Declaration
Returns
selectAllText()
Declaration
Returns
selectCurrentParagraph()
Declaration
selectCurrentParagraph(): void;
Returns
selectCurrentWord()
Declaration
selectCurrentWord(): void;
Returns
setCharStyleForPosition(position, style)
Declaration
setCharStyleForPosition(position: IPositionInText, style: ICharStyle): void;
Parameters
Returns
setCurrentCharStyle(style)
Declaration
setCurrentCharStyle(style: ICharStyle): void;
Parameters
Returns
setCurrentParagraphStyle(style)
Declaration
setCurrentParagraphStyle(style: IParagraphStyle): void;
Parameters
Returns
setCursorToPoint(point)
Declaration
setCursorToPoint(point: IPoint): void;
Parameters
Type |
Name |
Description |
IPoint |
point |
|
Returns
setCursorToPosition(position)
Declaration
setCursorToPosition(position: IPositionInText): void;
Parameters
Returns
setParagraphStyleByIndex(index, style)
Declaration
setParagraphStyleByIndex(index: number, style: IParagraphStyle): void;
Parameters
Returns
setSelection(startPoint, endPoint)
Declaration
setSelection(startPoint: IPoint, endPoint: IPoint): void;
Parameters
Returns
setTextModel(model)
Declaration
setTextModel(model: Text): void;
Parameters
Type |
Name |
Description |
Text_2 |
model |
|
Returns
setWrappingPath(data)
Declaration
setWrappingPath(data: IWrappingPathData): void;
Parameters
Returns
undo()
Declaration
Returns