Add credit for copy code button

This commit is contained in:
Helen Chong 2025-02-19 10:21:45 +08:00
parent 3ca93c1ed4
commit 5c55d0a0e3
1 changed files with 5 additions and 0 deletions

View File

@ -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) {
return `<div class="cc-wrapper d-none d-sm-block">
<button class="cc-btn btn-muted shadow" data-target="${blockIndex}">