Skip to main content

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​

ITextRange

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​
ParameterTypeDescription
startPointIPointstarting point.
endPointIPointending point.
Returns​

void

Was this page helpful?