How to restrict the readers from copying the content?

Prev Next

Plans supporting this feature: Business Enterprise

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 readers from copying the content.

By implementing the below solution, the readers can still select the content and perform a 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. Navigate to Settings () > Knowledge base site > Customize site > Custom CSS & JavaScript in the Knowledge base portal.

  2. Paste the below snippet in the JavaScript panel.

$(document).ready(function(){
$('.content_block').bind("cut copy paste",function(e) {
e.preventDefault();
});
});
$(document).ready(function(){
$('d360-article-content').bind("cut copy paste",function(e) {
e.preventDefault();
});
});
  1. Click Save.