> For the complete documentation index, see [llms.txt](/llms.txt).
> The full corpus is at [llms-full.txt](/llms-full.txt).

# OnPasteFn

> **OnPasteFn** = (`data`) => [`OnPasteResultOrPromise`](/api/editor/type-aliases/onpasteresultorpromise/)

Defined in: packages/editor/src/types/editor.ts:166

It is encouraged not to return `Promise<undefined>` from the `OnPasteFn` as
a mechanism to fall back to the native paste behaviour. This doesn't work in
all cases. Always return plain `undefined` if possible.

:::caution[Beta]
This API should not be used in production and may be trimmed from a public release.
:::

## Parameters

### data

[`PasteData`](/api/editor/interfaces/pastedata/)

## Returns

[`OnPasteResultOrPromise`](/api/editor/type-aliases/onpasteresultorpromise/)