Image Paste Disable

Is there a way to disallow or disable pasting of images in the Rich Text Editor.  I have removed the button from the toolbar, but I can still paste images.


2 Replies 1 reply marked as answer

BS Buvana Sathasivam Syncfusion Team March 15, 2022 08:03 AM UTC

Hi Charles,


Greetings from Syncfusion support.


Currently, we are validating your reported query. We will update you with further details on or before March 16, 2022.


Regards

Buvana S



BS Buvana Sathasivam Syncfusion Team March 16, 2022 09:03 AM UTC

Hi Charles, 

Thank you for your patience. 

You should be able to achieve your requirement by using the DeniedTags property, which is used to ignore the tags when pasting the HTML content. Please find the below code and sample for your reference. 

<SfRichTextEditor AutoSaveOnIdle="true" > 
     <RichTextEditorPasteCleanupSettings DeniedTags="@Deniedtags" />                </SfRichTextEditor> 
 
@code{ 
   private string[] Deniedtags { get; set; } =new string[] { "img" }; 
} 





Please let us know if you have any other concerns. 

Regards, 
Buvana S 


Marked as answer
Loader.
Up arrow icon