Copy to Clipboard

Add a button that copies the code block to the clipboard when clicked.

How to use

In addition to including the plugin file with your PrismJS build, ensure Clipboard.js is loaded before the plugin.

The simplest way to include Clipboard.js is to use any of the recommended CDNs. If you're using Browserify, Clipboard.js will be loaded automatically if it's included in your package.json. If you don't load Clipboard.js yourself, the plugin will load it from a CDN for you.