# ClientClipboard

The [Clipboard ](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API)extension provides the ability to respond to clipboard commands (cut, copy, and paste) as well as to asynchronously read from and write to the system clipboard.

{% embed url="<https://github.com/iceteagroup/wisej-extensions/tree/master/Wisej.Ext.ClientClipboard>" %}
ClientClipboard Source Code
{% endembed %}

## Features

* Write to the client's clipboard.
* Read the client's clipboard contents.

{% hint style="danger" %}
Some features are not available in all browsers. Be sure to check the latest documentation on MSDN.
{% endhint %}

## How to Use

The **ClientClipboard** extension can be added to a Wisej.NET project using NuGet Package Manager.

{% embed url="<https://www.nuget.org/packages/Wisej-3-ClientClipboard>" %}

### Clipboard Events

Handle when the user copies, cuts, or pastes content to or from the clipboard.

```csharp
ClientClipboard.ClipboardChange += new ClientClipboardEventHandler(ClientClipboard_ClipboardChange)
```

### Write to the Clipboard

Writes the specified text to the client clipboard.

```csharp
await ClientClipboard.WriteTextAsync("Hello, World!");
```

### Read from the Clipboard

Returns the textual content of the client clipboard.

```csharp
var text = await ClientClipboard.ReadTextAsync();
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/extensions/extensions/clientclipboard.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
