RadRichTextEditior GetPlainText method doesn’t seem to work

3 posts, 1 answers
  1. Joy
    Joy avatar
    7 posts
    Member since:
    Sep 2014

    Posted 25 Aug 2015 Link to this post

    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. Answer
    Dimitar avatar
    2823 posts

    Posted 26 Aug 2015 Link to this post

    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. 
    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
  3. Joy
    Joy avatar
    7 posts
    Member since:
    Sep 2014

    Posted 27 Aug 2015 in reply to Dimitar Link to this post

    That did it! Thanks Dimitar!
Back to Top