Add credit for copy code button
This commit is contained in:
parent
7933feafb0
commit
2e5a71dcb4
@ -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…
x
Reference in New Issue
Block a user