Join our Telegram and Youtube Channels

How to create Double Tab to copy Syntax Highlighter on blogger website

hi dude, welcome to our Pixabin Official blog. let us see how to add a syntax highlighter with a double tab to Copy Function on your blogger Template.

This Double tab to copy function is automatically applied on your blogger template's default syntax highlighter. user Click double time on syntax highlighter. this function automatically triggered and copied all Syntax texts on your Clipboard.

if your want to add syntax highlighter on your blogger Template. please Click these Article Link

What is a double Tab to copy on syntax highlighter?

Double tab to copy Syntax Highlighter means the user can click this syntax highlighter on your website. this js function was automatically triggered and copied all syntax highlighter Text on your Clipboard. this all! Otherwise this normal Syntax highlighter. this is Extra Feature Only.

How to setup this Syntax Highlighter on blogger step by step

  • Go to your blogger dashboard and go to the theme section
  • Now click the drop-down menu and click Edit HTML Option
  • And, Click Ctrl+F button and type </body> Tag and Find the </body> Tag. After copying the below Syntax Highlighter JavaScript.
  •       <!--[ Double click to Copy ]-->
    <script>/*<![CDATA[*/ for(var preclick=document.getElementsByTagName('pre'),i=0;i<preclick.length;i++)preclick[i].addEventListener('dblclick',function(){var e=getSelection(),t=document.createRange();t.selectNodeContents(this),e.removeAllRanges(),e.addRange(t),document.execCommand('copy'),this.classList.add('copied'),setTimeout(()=>{window.getSelection().removeAllRanges(),this.classList.remove('copied')},4e3)},!1); /*]]>*/</script>
  • Now paste copied syntax highlighter javascript above on </body> Tag.
  • Save your template. 
  • Your double Tab to copy syntax highlighter is Ready.

Custom Modification

  • Do not need any modification. Just Copy and Paste

Video Guide

No Available At this Time

Final Words

We hope this syntax highlighter script helps your blogger website. If you want more blogger, WordPress and YouTube Guidelines for you please my blogger on YouTube, telegram and Google News.

Related Posts

Post a Comment

Table of Contents