• I want to disable right click, copy, paste and cut options without a plugin. And I don’t to show any alert messages to users if they have right clicked. Can I get some help please.

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • The short answer is you can’t — with or without a plugin. You can easily copy content on a webpage with the keyboard, so disabling the mouse’s right-click doesn’t do jack to help with that.

    To your question on plugins, if you want to do anything without the use of plugins, you’ll have to write the JavaScript and/or PHP programming code yourself to do what the plugin would be doing.

    Here is a pure JavaScript code for this: https://www.computerhope.com/javascript/disable-right-click.htm

    UPDATE: I just found out you can use the CSS user-select property to prevent the selection of text by mouse or keyboard. Please see MDN documentation.

    Note though that both restrictions can VERY EASILY be bypassed. Such restrictions often do nothing to deter people bent on stealing your content, while becoming a PITA for legitimate users (eg someone copying a paragraph of text for offline citation).

    • This reply was modified 5 years, 8 months ago by George Appiah. Reason: Added additional info on CSS user-select
Viewing 1 replies (of 1 total)

The topic ‘Disable right click, copy, paste, cut without a plugin’ is closed to new replies.