Published on

Stripping HTML using the RadEditor

Authors

The RadEditor does a pretty badass job of stripping HTML since you can feed the html string into the .Content property, and then just read it back out via the Text property.  Here’s a quick extension method which does just that

Ok so now this makes the StripHtml method available right on the object instead of needing to pass in a value and return something back.  Just like .ToString(), you’ll now do .StripHtml()

Alternatives

If you HAVE the RadEditor in the project, might as well use it if you want to keep the project as light as possible. But going forward really the BEST bet is the HtmlAgilityPack