Clipboard Helper
v1.0.0Global utility function to copy text in the clipboard.
Copy to clipboard
copyToClipboard() uses the browser Clipboard API and resolves after the text has been written.
import { copyToClipboard } from '@oardi/ts-utils';
await copyToClipboard('some text');
The Clipboard API requires a browser environment and may require HTTPS or explicit user permission.
Previous:Helpers
← Canvas HelperNext:Helpers
CSV Helper →