This is a migrated thread and some comments may be shown as answers.

Strip Editor HTML

2 Answers 85 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 25 Mar 2010, 08:04 AM
Hey!

I'd like to display text only summary of the content that was created through the editor with formatting, but no matter what I do, Server.HtmlDecode etc., there are still tags and bits and pieces left in it!! Is there a clean way of doing it? Cheers!

2 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 25 Mar 2010, 04:15 PM
I think that you're looking for is the "Text" property of the RadEditor. According to the tooltip from intellisense it "gets the text content of the RadEditor control without the HTML markup". It's also very easy to get this and assign it to a String variable since all you have to do is call RadEditor1.Text!
0
Joe
Top achievements
Rank 1
answered on 26 Mar 2010, 06:00 AM
Thanks Schlurk - I was using Text property, but my problem was that I was displaying a small summary and was cutting a chunk out before assigning it to Text property, so it was getting summary of content minus closing tags and not doing what I wanted!
Tags
Editor
Asked by
Joe
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Joe
Top achievements
Rank 1
Share this question
or