04 December 2008

Display HTML File in Flex TextArea

For a current project, I needed to have a help file for a Flex app that anyone with some HTML knowledge could update. One solution was described by PeterD on his great FlexExamples.com blog post. You can even apply a stylesheet to the HTML. Some big caveats: Because the Flex TextArea is based on the the underlying Flash API's flash.text.TextField object, it only allows a very limited number of HTML tags; the LiveDocs have a list of the allowed tags. And anything but very basic CSS is ignored.

4 comments:

Anonymous said...

Yeah this is one of the areas that really lets flex down. It makes the development of a flex based html editor very difficult or maybe even impossible. Most likely a security concern of Adobes or something like that.... surely they could have come up with a better solution than to just leave it in the too hard basket.

Alex C said...

Flex is still a relatively young product; they'll add new features and this might be one of them.

Anonymous said...

Thats true, actually I had a quick look s labs... this looks promising...
http://labs.adobe.com/technologies/textlayout/

Alex C said...

Thanks, Brendon. Hadn't seen that. I'll post it to the blog.