How to Disable Text Selection/Copying and Enable for Text Within Blockquotes

0

Plagiarism as defined on Wikipedia is the “wrongful appropriation” and “stealing and publication” of another author’s work. It’s the major problem faced by Bloggers this days and has been discussed in details on several blogs. Several methods have been devised to help prevent content thieves from stealing information and contents from a blog post but I think the best method is to disable text selection/copying on the blog. This will prevent users from highlighting any text in the blog but can be very bad for tech blogs which share codes that users have to copy.#blockquote

For this reason, I have decided to provide you guys with a CSS code which will help disable text selection/copying on your blog but at the same time enable the selection/copying of texts enclosed within blockquotes. So if you run a Tech blog that provides codes for users but want to prevent them from selection or copying any other texts other than the codes and texts enclosed within the blockquotes, the follow the steps below to add the CSS code to your blog page.

  • Login to your Blogger Dashboard.
  • Navigate to Template >>> Edit HTML.
  • Search for ]]></b:skin> using Ctrl + F.
  • Copy the CSS code below and paste just above/before the ]]></b:skin>.
/* Disable Selection by Educative Helper */

.post-body {

-webkit-user-select: none;

-moz-user-select: none;

-ms-user-select: none;

-o-user-select: none;

user-select: none;

}

blockquote {

-webkit-user-select: text;

-moz-user-select: text;

-ms-user-select: text;

-o-user-select: text;

user-select: text;

}
  • Click on Save Template and you are done.

Remember that for the above CSS code to work for you, you need to enclose the text you want your users to be able to select and copy inside the <blockquote> tag. To enclose a text or code inside a <blockquote> tag, use the below format

<blockquote>

Your Text/Code Here

</blockquote>

For more information on how to customize a blockquote for your blog, read Adding Customized Blockquote to Blogger Blog.

LEAVE A REPLY

Please enter your comment!
Please enter your name here