# useSmartPaste (@salmonui/chat/smart-paste)

> The useSmartPaste function of @salmonui/chat/smart-paste: Smart paste for the form (or any container) behind formRef: pair it with any Button (onClick={() => paste()}, aria-busy={pending}).

Canonical: https://salmonui.dev/docs/reference/chat/smart-paste/useSmartPaste

```ts
import { useSmartPaste } from '@salmonui/chat/smart-paste';
```

Entry index: https://salmonui.dev/docs/reference/chat/smart-paste (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/chat/smart-paste.md).

## Reference

Kind: function

```ts
function useSmartPaste(formRef: RefObject<HTMLElement | null>, adapter: SmartPasteAdapter, options?: SmartPasteOptions): SmartPaste;
```

Smart paste for the form (or any container) behind `formRef`: pair it with
any `Button` (`onClick={() => paste()}`, `aria-busy={pending}`).
