1 Reply Latest reply on Jul 19, 2008 5:57 AM by Hugo_Core

    htmlText > Text

    Hugo_Core Level 1
      Hi guys,

      Does somebody have an idea to convert htmlText to text, it means remove the Angle Brackets.

      Example:

      <FONT ...>Lorem Ipsum</FONT>

      to

      Lorem Ipsum



      I don't know, RegExp, some String Method ? :S

      Thanks,
      Core
        • 1. Re: htmlText &gt; Text
          Hugo_Core Level 1
          Nevermind, i resolved it.

          Create a RichTextEditor pass the "htmlText" to it, then accessing to is "Text"
          proproety it's
          tag free :D

          Example:

          <mx:RichTextEditor x="20" y="10" title="Title" id="richText">
          <mx:htmlText>
          <![CDATA[
          <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT
          FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0">Ola
          tudo bem?</FONT></P></TEXTFORMAT>
          ]]>
          </mx:htmlText>
          </mx:RichTextEditor>
          <mx:TextArea x="491" y="10" width="260" height="300"
          backgroundColor="#0E0E0E" color="#FFFFFF" text="{richText.text}"/>

          The text in the TextArea are not formated was i wanted :)

          Thanks, anyway