Clipboard
Provide helpers for working with the system clipboard.
# API
# ClipboardConfig
| Property | Description | Default |
|---|---|---|
copiedDuring? |
numberMilliseconds to reset state of copied. |
1500 |
onCopy? |
(value?: string) => void | undefinedCallback when copy is triggered. |
— |
# ClipboardReturn
| Property | Description |
|---|---|
isSupported |
booleanWhether Clipboard API is supported. |
text |
Readable<string>Last copied text. |
copied |
Readable<boolean>Triggers every time a copy is happening and expires after copiedDuring milliseconds. |
copy |
(text: string | HTMLElement) => PromiseUtility function to copy text or the contents of a HTMLElement. |