Define a component through CopyToClipboard
to achieve the effect of clicking the component to copy text.Example#
Click here to copy text
<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".Click here to copy text
<CopyToClipboard text="actual copied text">Click here to copy text</CopyToClipboard>
Parameter Description#
Modified at 2024-05-29 06:52:56