Closed kapunahelewong closed 2 years ago
Add a copy code button to code blocks if a browser supports the functionality.
This code is kindly shared under the MIT License by Tom Spencer in their most excellent tutorial.
Copy button changed to "Copied!" as confirmation.
Also adds some samples to the demo page.
Nice addition!
I've tested using: MacOS
Ubuntu
/lgtm
[edited to remove DCO comment.]
Add a copy code button to code blocks if a browser supports the functionality.
This code is kindly shared under the MIT License by Tom Spencer in their most excellent tutorial.
Copy button changed to "Copied!" as confirmation.
Also adds some samples to the demo page.