CopyCode

for Reveal.js

Customized copy button

let why = `Because we always want to copy code
           during our presentations, right?`

Configuring CopyCode

copycode: { timeout: 1200, button: "hover", display: "icons", style: { copybg: "rgba(255,255,255,128)", copiedbg: "white", copyborder: "2px solid gray", copiedborder: "2px solid green", copiedcolor: "green", offset: 0.5, radius: 0.2} }

Add the above code to the Reveal.js configuration, and you will get a 'GitHub-flavored' copy button.

This is just an example file to show a customized copy button. For more CopyCode options, check the demo.