Skip to main content

copyClipboardText

A function that saves the given string to the Clipboard. If the browser does not support the Clipboard API, clipboardFallbackTextCopy is called instead.


Code

🔗 View source code


Interface

typescript
const copyClipboardText: (value: string) => Promise<string>

Usage

typescript
import { copyClipboardText } from '@modern-kit/utils';

const result = await copyClipboardText("text to copy");