Skip to main content

ICursorService

Interfaces

ICursorService

Service for performing basic operations with the cursor.

Extended by

Properties

cursorChangedEvent
cursorChangedEvent: EventObject<IPositionInText>;

Cursor change event.

Remarks

Reports the current cursor position.

Methods

getCurrentParagraphIndex()
getCurrentParagraphIndex(): number;

Returns the current index of the paragraph (from 0).

Returns

number

getCurrentPosition()
getCurrentPosition(): IPositionInText;

Returns the current cursor position.

Returns

IPositionInText

getFirstPosition()
getFirstPosition(): IPositionInText;

Returns the first position in the text.

Returns

IPositionInText

moveCursorToDirection()
moveCursorToDirection(direction, withSelection?): void;

Moves the current cursor position in the specified direction.

Parameters
ParameterTypeDescription
directionMoveDirectionTypedirection of cursor movement.
withSelection?booleanindicates whether the cursor moves with text selection (the default value is false).
Returns

void

setCursorToPoint()
setCursorToPoint(point): void;

Sets the cursor to a point in the text.

Parameters
ParameterTypeDescription
pointIPointthe expected point.
Returns

void

setCursorToPosition()
setCursorToPosition(position): void;

Sets the cursor at a position in the text.

Parameters
ParameterTypeDescription
positionIPositionInTextthe expected position in the text.
Returns

void

Was this page helpful?