Donation  Momo Buy me a coffee!

How to Add Double Click to Copy for CodeBox - Syntax Highlighter

This article will guide you to optimize your code copying with just two clicks and without any hassle.
Adding Double Tap to Copy for Synta Highlighter - CodeBox
Adding Double Tap to Copy for Syntax Highlighter - CodeBox

 Hello, everyone! Wellcome to SoiPro .Today on this occasion I will going to share a tutorial about How to Add Double Click to Copy for CodeBox - Syntax Highlighter

As always, before starting, take a backup of your blog template to restore it easily in case of any kind of error .

Adding Double Tap to Copy for Syntax Highlighter

You have to follow only one step, just be patient and follow the post till the last. You will not regret after adding it to your blog. Because it is very useful for bloggers and for user interface.

Follow these steps carefully

Step 1: First of all Login to your Blogger Dashboard..
Step 2: On Blogger Dashboard., click Theme.
Step 3: Click the arrow down icon  next to 'customize' button.
Step 4: Click Edit HTML, you will be redirected to editing page.
Step 5: Now pressing Ctrl + F to find the code </body> and paste the following JavaScript Codes given below.
Step 6: Lastly, Save the changes by clicking on this icon 

 <!--[ 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>

So after following the above steps, I hope that you have successfully installed Syntax Highlighter Scripts to be copied by double tabbing in your blog. If you are facing any problem then you can comment below, you will definitely be helped by replying.

Conclusion

Ok so that 's How to Add Double Click to Copy for CodeBox - Syntax Highlighter. I hope you enjoy this article. Please do share this article. And if you are facing problem in any section or you have any question then ask us in comment box. Thank you!

Source:
www.soipro.com

About the Author

Hello this is NVH Corp, I am Web Designer and Expert at SoiPro(dot)Com

Đăng nhận xét

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.