What is the best way to display HTML in Flex?

I have HTML that includes symbols such as the Trademark "TM" as superscript (™). In normal HTML, I would use "&trade;" or &#153; to display the Trademark TM. However, I can find no way to import HTML like this into Flex and have it displayed correctly. I am having similar issues with the <li> tag.

My HTML:

<p>This information is intellectual property of My Company&#153;.</p>

<p>Available features:</p>

<li>Feature 1</li>
<li>Feature 2</li>
<li>Feature 3</li>
<li>Feature 4</li>

<p>COPYRIGHT INFORMATION:</p>

<p>Copyright &#169; 2008, My Company. All rights reserved.</p>

The only way that I've gotten this to work is by copying and pasting the content directly into Flex:

<mx:Text width="100%" height="100%">
    <mx:htmlText>
        <![CDATA[
This information is intellectual property of My Company™. 

Available features:

•   Feature 1
•   Feature 2
•   Feature 3
•   Feature 4

COPYRIGHT INFORMATION:

Copyright © 2008, My Company. All rights reserved. 
        ]]>
    </mx:htmlText>
</mx:Text>

I want to use an external HTML file that I can import into my Flex App at run time, so that I don't have to recompile the app for a simple content change.

I've heard of too many issues with the iFrame option, so I want to avoid that, if possible.

Does anyone have any other good suggestions for dealing with this issue?

Thank you.

Answers


Okay, this is a tricky one. I just finished a project where we used this open-source library to display HTML: http://code.google.com/p/flex-htmlfilter

It handles lists, tables, etc, and is pretty easy to work with. But, I don't think it supports the trademark symbol. It does support some of the others, though.

I'm using it to pull content from a CMS and display in my flash movie. It has worked great, and allows me all the flash styling flexibility I need.


Need Your Help

Perl or MySQL for accessing and retrieving information

html mysql perl parsing

I'm trying to retrieve a couple of webpages so that I can manipulate their information. I am looking for what are the best tools and packages for doing this. Preferably, I would appreciate to use P...

View with small modifications for different types of article

database forms view yii

I have one view for a type of article, I need to extends this view and if user open article type "Special" I need to show some new fields in this view.