---
title: "SelectWordCmd | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/SelectWordCmd/"
---

# SelectWordCmd

> The command to select a word relative to the current cursor position.

## Classes

### SelectWordCmd

#### Implements

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

#### Constructors

##### Constructor

```ts
new SelectWordCmd(textManager, initData): SelectWordCmd;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `textManager` | [`ITextManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ITextManager.md#itextmanager) |
| `initData` | [`SelectWordCmdData`](#selectwordcmddata) |

###### Returns

[`SelectWordCmd`](#selectwordcmd)

#### Methods

##### execute()

```ts
execute(): boolean;
```

Executes the command.

###### Returns

`boolean`

true if changes were made, false otherwise.

###### Implementation of

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

***

### SelectWordCmdData

Data required to initialize the command.

#### Constructors

##### Constructor

```ts
new SelectWordCmdData(point): SelectWordCmdData;
```

###### Parameters

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

###### Returns

[`SelectWordCmdData`](#selectwordcmddata)

#### Properties

##### point

```ts
point: IPoint;
```

A point for selecting a word.
