ISelectionService
Interfaces
ISelectionService
Service for performing basic operations with text selection.
Extended by
Properties
selectionChangedEvent
selectionChangedEvent: EventObject<ITextRange>;
Text selection change event.
Remarks
reports the currently selected text.
Methods
getSelectedParagraphIndexes()
getSelectedParagraphIndexes(): number[];
Returns the currently selected paragraphs indexes (by selection or cursor position).
Returns
number[]
getSelectedTextRange()
getSelectedTextRange(): ITextRange;
Returns the currently selected text range.
Returns
resetSelection()
resetSelection(): void;
Resets text selection.
Returns
void
selectAllText()
selectAllText(): void;
Selects all text.
Returns
void
selectCurrentParagraph()
selectCurrentParagraph(): void;
Selects a paragraph relative to the current cursor position.
Returns
void
selectCurrentWord()
selectCurrentWord(): void;
Selects a word relative to the current cursor position.
Returns
void
setSelection()
setSelection(startPoint, endPoint): void;
Sets the selection of text by starting and ending points.
Parameters
| Parameter | Type | Description |
|---|---|---|
startPoint | IPoint | starting point. |
endPoint | IPoint | ending point. |
Returns
void