Copy to Clipboard
Define a component through CopyToClipboard
to achieve the effect of clicking the component to copy text.
Example Effect
Code:
<CopyToClipboard>Click here to copy text</CopyToClipboard>
The content of the component follows Markdown syntax.
Specify the content to be copied
When you need the "copied content" to be different from the "displayed content", you can use the text
parameter to set the "actual copied content".
Code:
<CopyToClipboard text="actual copied text">Click here to copy text</CopyToClipboard>
Parameter Description
Last modified: 5 months ago