Clipboard
Provide helpers for working with the system clipboard.
# API
# ClipboardConfig
Property | Description | Default |
---|---|---|
copiedDuring? |
number Milliseconds to reset state of copied . |
1500 |
onCopy? |
(value?: string) => void | undefined Callback when copy is triggered. |
— |
# ClipboardReturn
Property | Description |
---|---|
isSupported |
boolean Whether 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) => Promise Utility function to copy text or the contents of a HTMLElement . |