Skip to main content
August 18, 2010
Answered

rich text to plain text

  • August 18, 2010
  • 1 reply
  • 642 views

if i have a database that contains rich text from a flex program how could i convert that rich text to just plain text to show in an HTML box?

so something like this (saved in a DB as rich text):

<b>***08/12/2010 09:09:05 AM***</b><br><i>John Doe has added a note:</i><br><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0">Testing, testing 123.</FONT></P></TEXTFORMAT><br>

To just look like this:

John Doe has added a note:

Testing, testing 123.

thanks!

    This topic has been closed for replies.
    Correct answer JR__Bob__Dobbs

    Step 1: Use ReplaceNoCase to replace "<br>" with a line break.

    Step 2: Use the stripHtml function from cflib.org to remove the HTML tags.

    1 reply

    JR__Bob__DobbsCorrect answer
    Inspiring
    August 18, 2010

    Step 1: Use ReplaceNoCase to replace "<br>" with a line break.

    Step 2: Use the stripHtml function from cflib.org to remove the HTML tags.