Apidog Markdown
  1. Components
Apidog Markdown
  • Welcome to Apidog Markdown
  • Basic Syntax and Features
    • Title and Text
    • Lists & Tables
    • Image
    • Video
    • Code
    • Icon
    • Tailwind CSS Supports
  • Components
    • Admonition
    • Hightlight
    • Accordion
    • AccordionGroup
    • Multiple Columns
    • Card
    • Card Group
    • Image Frame
    • Step
    • Tab
    • Tip
    • Copy to Clipboard
    • Text Hover Tip
    • Text Drawing - Mermaid
      • Graph
      • Sequence Diagram
      • Class Digram
      • State Diagram
      • Entity Relationship Diagram
      • Journey Map
      • Gantt Chart
      • Pie Chart
    • Formula
      • Inline Formula
      • Block-level Formula
  • Other Questions
    • Shortcuts
  1. Components

Copy to Clipboard

Define a component through CopyToClipboard to achieve the effect of clicking the component to copy text.

Example Effect#

Click here to copy text
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".
Click here to copy text
Code:
<CopyToClipboard text="actual copied text">Click here to copy text</CopyToClipboard>

Parameter Description#

CopyToClipboard
text
string 
Custom Copy Text
optional
Place the text to be copied inside the text tag.
Previous
Tip
Next
Text Hover Tip
Built with