mirror of
https://github.com/Fechin/reference.git
synced 2026-11-20 21:23:11 +03:00
Added a plugin for copy code block
This commit is contained in:
1 parent
a87cd0dfbe
commit
349d845e36
1 file changed
+1
-1
@@ -45,7 +45,7 @@
|
||||
codeBlocks.forEach(function (codeBlock) {
|
||||
// Create a copy button element
|
||||
const copyButton = document.createElement('button');
|
||||
copyButton.className = 'bg-emerald-500 p-2 text-white fadeIn shadow-xl rounded flex items-center absolute top-0 right-4';
|
||||
copyButton.className = 'bg-emerald-500 p-2 text-white fadeIn shadow-xl rounded flex items-center absolute top-2 right-2';
|
||||
copyButton.innerHTML = initInnerHTML;
|
||||
copyButton.style.opacity = "0";
|
||||
const parent = codeBlock.parentNode;
|
||||
|
||||
Reference in new issue
Block a user