Add credit for copy code button
This commit is contained in:
parent
3ca93c1ed4
commit
5c55d0a0e3
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
Based on ttntm's code to add a button to copy code snippets:
|
||||||
|
https://ttntm.me/blog/adding-a-copy-button-to-code-blocks/
|
||||||
|
*/
|
||||||
|
|
||||||
function createCopyBtn(blockIndex) {
|
function createCopyBtn(blockIndex) {
|
||||||
return `<div class="cc-wrapper d-none d-sm-block">
|
return `<div class="cc-wrapper d-none d-sm-block">
|
||||||
<button class="cc-btn btn-muted shadow" data-target="${blockIndex}">
|
<button class="cc-btn btn-muted shadow" data-target="${blockIndex}">
|
||||||
|
|
Loading…
Reference in New Issue