Skip to main content
Participating Frequently
October 2, 2009
Question

HTML Text in Spark TextArea

  • October 2, 2009
  • 1 reply
  • 11402 views

Halo TextArea's htmlText property is not available in Spark TextArea. How does one go about displaying dynamic HTML text (via ActionScript) in a Spark TextArea?

It looks like I need to use 'content' property but Flex 4 Language Reference has no documentation on that property.

    This topic has been closed for replies.

    1 reply

    Peter_deHaan
    Participating Frequently
    October 2, 2009

    @Dilip Shah,

    There are a few different ways of setting rich formatted text in a RichText/RichEditableText/TextArea control in Flex 4:

    http://blog.flexexamples.com/2009/08/11/setting-text-in-a-spark-richtext-control-in-flex-4/

    HTH,

    Peter

    DilipShahAuthor
    Participating Frequently
    October 6, 2009
    Thanks Peter!
    I was using 4.0.0 sdk, which doesn't have classes  such as TextFlowUtil, etc. So I downloaded a nightly build (4.0.0.10802) and now  I have all the latest stuff but it breaks what used to work with 4.0.0! This sdk  version is giving bunch of internal build errors and when I switch to Error Log  view, I see dozens of "Uncaught exception in compiler"! I'm using Flash Builder  Plug-in and I have Eclipse Galileo.
    The latest skd also throws errors on classes that  used to work with 4.0.0, such as
    s:SimpleText with error:  Could not resolve <s:SimpleText> to a component  implementation.
    Is there a stable build that I can download and use  that has classes I need to add HTML text in a TextArea?
    Peter_deHaan
    Participating Frequently
    October 6, 2009

    @Dilip Shah,

    In the latest nightly builds of the Flex 4 SDK, the <s:SimpleText/> class has been renamed to <s:Label/>. For more information, see http://blogs.adobe.com/pdehaan/2009/09/spark_primitive_text_changes_f.html and http://opensource.adobe.com/wiki/display/flexsdk/Spark+Text+Primitives+Decision.

    I always suggest downloading and using the latest Flex 4 nightly SDK available as it always represents the latest code base.

    Peter