Display HTML using RichText
I need to simply display standart HTML-formatted text in my Flex 4 application. The text I need to display contains simple elements like "p" and "b", like so:
<p>The <b>quick</b> brown fox jumped over the <i>lazy</i> dog.</p>
How do I display text like this inside of Flex? When I load the HTML file containing this text and set my RichText's "text" property with it, I get unformatted text. What am I doing wrong?
<!-- example -->
<s:RichText text="{htmlLoader.lastResult}"/>
<fx:Declarations>
<s:HTTPService id="htmlLoader" url="assets/legal/test.html"/>
</fx:Declarations>
<fx:Script>
<![CDATA[
private function onCreationComplete():void {
htmlLoader.send();
}
]]>
</fx:Script>
