---
title: "ISelectionService | Customer&#x27;s Canvas"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ISelectionService/"
archived: false
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Customer's Canvas Hub"
    versions: ["cloud"]
    entity_id: "https://customerscanvas.com/products/hub#software-application"
  - product: "Design Atoms JS"
    versions: ["7.4"]
---

# ISelectionService

**Applies to:** Customer's Canvas On-Premises; Customer's Canvas Hub cloud; Design Atoms JS 7.4

> API reference for the ISelectionService module in @aurigma/design-atoms-text.

## Interfaces

### ISelectionService

Service for performing basic operations with text selection.

#### Extended by

- [`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager)

#### Properties

##### selectionChangedEvent

```ts
selectionChangedEvent: EventObject<ITextRange>;
```

Text selection change event.

###### Remarks

reports the currently selected text.

#### Methods

##### getSelectedParagraphIndexes()

```ts
getSelectedParagraphIndexes(): number[];
```

Returns the currently selected paragraphs indexes (by selection or cursor position).

###### Returns

`number`[]

##### getSelectedTextRange()

```ts
getSelectedTextRange(): ITextRange;
```

Returns the currently selected text range.

###### Returns

[`ITextRange`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextRange.md#itextrange)

##### resetSelection()

```ts
resetSelection(): void;
```

Resets text selection.

###### Returns

`void`

##### selectAllText()

```ts
selectAllText(): void;
```

Selects all text.

###### Returns

`void`

##### selectCurrentParagraph()

```ts
selectCurrentParagraph(): void;
```

Selects a paragraph relative to the current cursor position.

###### Returns

`void`

##### selectCurrentWord()

```ts
selectCurrentWord(): void;
```

Selects a word relative to the current cursor position.

###### Returns

`void`

##### setSelection()

```ts
setSelection(startPoint, endPoint): void;
```

Sets the selection of text by starting and ending points.

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `startPoint` | [IPoint](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-model/IPoint.md) | starting point. |
| `endPoint` | [IPoint](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-model/IPoint.md) | ending point. |

###### Returns

`void`
