How to restrict the readers from copying the content?
  • 29 Sep 2022
  • 1 Minuut om te lezen
  • Bijdragers
  • Donker
    Licht
  • Pdf

How to restrict the readers from copying the content?

  • Donker
    Licht
  • Pdf

There is no Dutch content available for this article, You are viewing the fallback version (English).

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 dit artikel nuttig?