This is a migrated thread and some comments may be shown as answers.

Disable copying

2 Answers 11 Views
RichTextEditor
This is a migrated thread and some comments may be shown as answers.
Jeffrey
Top achievements
Rank 1
Jeffrey asked on 29 Oct 2018, 10:01 PM

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 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 30 Oct 2018, 10:41 AM
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.
0
Jeffrey
Top achievements
Rank 1
answered on 01 Nov 2018, 08:30 PM
Thanks worked great!
Tags
RichTextEditor
Asked by
Jeffrey
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Jeffrey
Top achievements
Rank 1
Share this question
or