copyFallbackClipboardText
A function that saves the given string to the Clipboard.
This is a fallback function that runs when the Clipboard API cannot be used — for example, when the browser does not support the Clipboard API or when the environment is not HTTPS.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Code
Interface
typescript
const copyFallbackClipboardText: (value: string) => string
Usage
typescript
import { copyFallbackClipboardText } from '@modern-kit/utils';
const result = copyFallbackClipboardText("text to copy");