BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi Timothy,
Thank you for your interest in Syncfusion products.
In SfRichTextBoxAdv control it is not possible to specifically disable
copy/paste or selection functionality. Instead we can disable entire edit
(Including copy/paste) functionality by setting IsReadOnly property to true.
Please do find the code snippet to set IsReadOnly property from below.
Code Snippet:
[XAML]
<syncfusion:SfRichTextBoxAdv x:Name="richTextBoxAdv" IsReadOnly="True" ManipulationMode="All" />
[C#]
richTextBoxAdv.IsReadOnly
= true;
Please let us know if you have any other questions.
Regards,
Gunasekaran
Hi Timothy,
Thank you for your update.
Regarding “Setting IsReadOnly to True has not disabled copy/paste for me”:
In general setting IsReadOnly to true will disable only the edit functionality within
the particular control (Cut/Paste content in to control will be disabled), and
copy functionality will work as normal, since copying selected content to system
Clipboard does not lead to any edit operation within the control. This behavior
is common to all Text box control and the same behavior is implemented in
SfRichTextBoxAdv control.
In order to disable Copy/Cut/Paste option from keyboard events in
SfRichTextBoxAdv control, we can create a custom control inheriting
SfRichTextBoxAdv and override the KeyDown events to disable Copy/Cut/Paste operations
explicitly. Please do find the sample for the same from attachment.
Please let us know if you have any other questions.
Regards,
Gunasekaran