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

RadRichTextEditior GetPlainText method doesn’t seem to work

2 Answers 148 Views
RichTextEditor
This is a migrated thread and some comments may be shown as answers.
Joy
Top achievements
Rank 1
Joy asked on 25 Aug 2015, 03:38 PM

All -

I'm trying to get the plain text as well as the HTML formatted text from my RichTextEditor, but the GetPlainText method is always returning back empty string. The GetContent method works just fine.

Is this a known issue or am I doing something wrong? 

Thank You

string sPlainText = rtbSMTPMessage.GetPlainText();
string sHTMLText = rtbSMTPMessage.GetContent("html");

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 26 Aug 2015, 09:27 AM
Hi Joy,

Thank you for writing.

The GetPlainText method is inherited from RadControl and it should not be used with RadRichtextEditor. To get the text you can use the GetContent method and specify the format like this:
string text = radRichTextEditor1.GetContent("txt");

Please let me know if there is something else I can help you with. 
 
Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Joy
Top achievements
Rank 1
answered on 27 Aug 2015, 11:32 PM
That did it! Thanks Dimitar!
Tags
RichTextEditor
Asked by
Joy
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Joy
Top achievements
Rank 1
Share this question
or