# PasteHandler

> _Since v0.4.2_

Custom paste handler function.

```ts
type PasteHandler = (detail: PasteDetail, grid: GridElement) => boolean | void
```

#### Example

```ts
// Custom handler that validates before pasting
new ClipboardPlugin({
  pasteHandler: (detail, grid) => {
    if (!detail.target) return false;
    // Apply custom validation/transformation...
    applyPasteData(detail, grid);
    return false; // We handled it, skip default
  }
})
```
