0

Handle Rich Text Editor In SharePoint

While accessing a data from a list where we have rich text editor, We might get an unexpected problem. While getting the data from list item columnusing listitem[“Column Name”], in case of rich text field, we get entire HTML data.

This might be a problem when you are doing a ciustome web part and retrive data .The HTML might break some of ur desired HTML.Lets say if you need your entire string to be stripped off all tags, Below code will be helpful.
plainText= Regex.Replace(html, @"]*>", "");
Use namespace System.Text.RegularExpressions to make Regex available. html is variable having the HTML content.