You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The code snippets used in the markdown files are doesn't show the code type mentioned in markdown.
The copy to clipboard option in the top right corner for each code snippets would be a great feature.
Describe the solution you'd like
The code snippets used in the markdown files are getting detected but would love to show what code it is such as bash, javascript, python, php, powershell etc just as mentioned in the markdown.
Also copy to clipboard option in the top right corner for each code snippets (where the button is changed upon click showing as copied with a color change for 3-4 seconds).
Describe alternatives you've considered
I tried to implement the 2nd feature mentioned, but the copy button always ends at the left side bottom inspite of using the css. Please find the code i tried below:
varcodeBlocks=document.querySelectorAll('pre.highlight');codeBlocks.forEach(function(codeBlock){varButton=document.createElement('button');Button.className=' ';Button.type='button';Button.ariaLabel='Copy code to clipboard';Button.innerText='Copy';codeBlock.append(Button);Button.addEventListener('click',function(){varcode=codeBlock.querySelector('code').innerText.trim();window.navigator.clipboard.writeText(code);Button.innerText='Copied';varfourSeconds=4000;setTimeout(function(){Button.innerText='Copy';},fourSeconds);});});
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
Describe alternatives you've considered
I tried to implement the 2nd feature mentioned, but the copy button always ends at the left side bottom inspite of using the css. Please find the code i tried below:
Placed the below in the _includes/head.html
The text was updated successfully, but these errors were encountered: