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

# CopyToClipboardCmd

> The command to copy the selected text to the clipboard.

## Classes

### CopyToClipboardCmd

#### Implements

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

#### Constructors

##### Constructor

```ts
new CopyToClipboardCmd(textManager, clipboard): CopyToClipboardCmd;
```

###### Parameters

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

###### Returns

[`CopyToClipboardCmd`](#copytoclipboardcmd)

#### 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)
