• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in displaying HTML in flex

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I want to display HTML in my flex application. HTML that I want to display is output of tinyMCE rich text area plugin (http://tinymce.moxiecode.com).

Example of HTML text that i want to display is like follows



I tried using TextArea to display this HTML. I tried it using website http://polygeek.com/2249_flex_display-html-text-in-the-spark-textarea.
But the above HTML text does not gets displayed properly.

if HTML is in following format
<span color="#3333ff">testcolor</span>
Then it gets displayed properly using TextArea
but it fails if styles are used i.e.
<span style="color: #ff6600;">color</span>


Same is the case if I use htmlText="" atribute of <mx:text>.

Any other way in which i can display my HTML in Flex ? Mean time I am looking at how to change output format of HTML generated by TinyMCE



 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not really. Flex's support for HTML is very poor. If you need to display HTML I would consider a different technology. There are third party extensions to show HTML, but these will increase the size of your SWF considerably.

It is I think the bug/enhancement request with the biggest number of votes: see this.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried this, http://livedocs.adobe.com/flex/3/html/help.html?content=textcontrols_04.html
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should be very aware of the caveats Adobe list in that control. It supports a very small subset of HTML elements, some are broken (the < img /> tag does not work properly, the cursor behaviour of <a / > is easily broken, the <font /> size attribute behaves differently from the spec. etc.) and included a tag not listed in the HTML spec. (the <textformat /> tag).

Basically, if rendering standards compliant HTML is an important aspect of your application, use a browser - don't use Flex.
 
reply
    Bookmark Topic Watch Topic
  • New Topic