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
getFirstPosition()
getFirstPosition(): IPositionInText;
Returns the first position in the text.
Returns
moveCursorToDirection()
moveCursorToDirection(direction, withSelection?): void;
Moves the current cursor position in the specified direction.
Parameters
| Parameter | Type | Description |
|---|---|---|
direction | MoveDirectionType | direction of cursor movement. |
withSelection? | boolean | indicates 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
| Parameter | Type | Description |
|---|---|---|
point | IPoint | the expected point. |
Returns
void
setCursorToPosition()
setCursorToPosition(position): void;
Sets the cursor at a position in the text.
Parameters
| Parameter | Type | Description |
|---|---|---|
position | IPositionInText | the expected position in the text. |
Returns
void