Disable copying

3 posts, 1 answers
  1. Jeffrey
    Jeffrey avatar
    21 posts
    Member since:
    Mar 2014

    Posted 29 Oct 2018 Link to this post

    Hi,

    I've been trying to find a way to disable the ability for a user to copy text or any content from a richtexteditor. I want to block any ability for shortcut keys or mouse clicking for copying content. Any help would be appreciated. Thanks!

    J

  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    2773 posts

    Posted 30 Oct 2018 Link to this post

    Hello Jeffrey,

    You can use the CommandExecuting event for this. Here is an example:
    private void RadRichTextEditor1_CommandExecuting(object sender, Telerik.WinForms.Documents.RichTextBoxCommands.CommandExecutingEventArgs e)
    {
        if (e.Command is CopyCommand)
        {
            e.Cancel = true;
        }
    }

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Jeffrey
    Jeffrey avatar
    21 posts
    Member since:
    Mar 2014

    Posted 01 Nov 2018 in reply to Dimitar Link to this post

    Thanks worked great!
Back to Top