We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Disable Image on RichTextEditor

Thread ID:





144182 Apr 23,2019 05:50 PM UTC Apr 24,2019 07:25 AM UTC ASP.NET MVC - EJ 2 3
Tags: RichTextEditor
James Gaston
Asked On April 23, 2019 05:50 PM UTC

I'm using the RichTextEditor in InLine Mode and I want to disable the image features, as pasting an image.

Is there any way to achieve that?

James Gaston
Replied On April 23, 2019 06:19 PM UTC

I just found out... It's just to add PasteCleanupSettings(p => p.PlainText(true))
I had hidden the add image button already

Prince Oliver [Syncfusion]
Replied On April 24, 2019 05:02 AM UTC

Hello James, 

Greetings from Syncfusion support. 

We are glad that you found the solution for your requirement. Please let us know if you need any further assistance on this. 


Prince Oliver [Syncfusion]
Replied On April 24, 2019 07:25 AM UTC

Hello James, 
You can also disable the images in the Rich Text Editor content using DeniedTags property in the PasteCleanupSettings when pasting an image. It will prevent image tags when pasting image element. In PlainText property, the copied content will be converted as a plain text by removing all the HTML tags and styles applied to it and only the plain text is pasted in the editor. If you wish to remove only on image tag, you can use DeniedTags property instead of using PlainText property. Please find the below code. 
@*// You can use the Denied Tags property*@ 
@Html.EJS().RichTextEditor("image").InlineMode((object)ViewBag.inline).PasteCleanupSettings(p => p.DeniedTags(ViewBag.deniedTags)).Render() 
ViewBag.deniedTags = new string[] { "img" }; // Here, specify denied tags when paste the content 
In above sample, we have used inline mode Rich Text Editor component and denied the image tag when pasting operation performed. 
Let us know if you need any further assistance on this. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon