How to restrict the readers from copying the content?
  • 29 Sep 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

How to restrict the readers from copying the content?

  • Dark
    Light
  • PDF

In general, you can copy the contents of the Knowledge base site easily with the mouse selection and Ctrl+C (or) alternative copy action. In confidential documentation, you would want to restrict the readers from copying the content. You can implement the below solution to restrict the readers from copying the content.

By implementing the below solution, the readers can still select the content and perform copy action(i.e., they can perform mouse selection, and press Ctrl +C or perform any copy action). However, the content will not be copied.


Solution

  1. Go to SettingsKnowledge base siteCustom CSS & JavaScriptCustom JavaScript
  2. Paste the below snippet in the window
$(document).ready(function(){
$('.content_block').bind("cut copy paste",function(e) {
e.preventDefault();
});
});

  1. Click Save

Was this article helpful?