animate.css icon indicating copy to clipboard operation
animate.css copied to clipboard

feat: Add Copy Button to Documentation Code Snippets (#1842)

Open Arohi-jd opened this issue 1 month ago • 0 comments

This PR adds a “Copy” button to all code snippets in the documentation (index.html), allowing users to copy code examples and commands with a single click. The feature improves usability and reduces the chance of errors when copying commands manually. All changes are contained within index.html, with inline CSS and JavaScript — no external files were modified. Key Changes Added a

tag that: Detects all

 blocks on page load.
Injects a copy button dynamically.
Uses navigator.clipboard.writeText() to copy text.
Provides success feedback with a checkmark icon.
This are the changes shown in image
Screenshot 2025-11-12 at 2 21 28 PM
Screenshot 2025-11-12 at 2 21 46 PM

Arohi-jd avatar Nov 12 '25 08:11 Arohi-jd