let why = `Because we always want to copy code
during our presentations, right?`
const http = require("http");
http.createServer(function (request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.end("Hello World\n");
}).listen(8081);
A 'Copy' button is automatically added to any <pre> code block.
…
Reveal.initialize({
copycode: {
copy: "Copy",
copied: "Copied!",
timeout: 1000
},
plugins: [ …
Override these global default values in the Reveal.js config. The timeout is the time in milliseconds for the "Copied!"-state to revert back to "Copy".
…
Reveal.initialize({
copycode: {
copybg: "orange",
copiedbg: "green",
copycolor: "black",
copiedcolor: "white"
},
plugins: [ …
Override these global default values in the Reveal.js config.
<pre data-cc="false">
<code>
Here is the code
</code>
</pre>
<pre data-cc-copy="Copy HTML" data-cc-copied="Done">
<code>
Here is the code
</code>
</pre>
Just edit the provided stylesheet.
…
<link rel="stylesheet" href="assets/js/revealjs/plugin/copycode/copycode.css">
…