highlightjs-copy
highlightjs-copy copied to clipboard
Show a icon with a checkmark instead of text
Leaving this here just in case someone is interested in having something similar.
Basically this removes localization and uses the clipboard icon with a check mark on top to confirm that the copy has happened. It's a bit more discreet than the original version. I decided to do this to solve an issue I was having where the confirmation text "Copied!" was not vertically centered (check screenshot).
This is the result:
https://github.com/user-attachments/assets/8ea27360-1eee-4cdf-b861-52c5c6cd04d6
This is the alignment problem I faced:
Deploy Preview for highlightjs-copy canceled.
| Name | Link |
|---|---|
| Latest commit | 8f6a8c3d977a785c1e5c1fcfe376d268bf553d83 |
| Latest deploy log | https://app.netlify.com/sites/highlightjs-copy/deploys/67d2816ab7f3d000084cf8a0 |
Deploy Preview for highlightjs-copy canceled.
| Name | Link |
|---|---|
| Latest commit | 58751e90761a76520f986afde4cacd39c25148b0 |
| Latest deploy log | https://app.netlify.com/projects/highlightjs-copy/deploys/6827ebc8dc0f2a0008e424da |