Search code examples
apache-flexflex4flash-builderflex4.5flexbuilder

Flex: Any way to use something like htmlText in Spark TextArea?


I´m using php services to insert text from MySql, to a TextArea. Ok, with mx textarea is working but how do i manage that with spark!?

this is my example with mx:

<mx:TextArea htmlText="{links.comment}"/>

this is an example with spark:

<s:TextArea>
    <s:textFlow>
        <s:TextFlow>
            <s:a href="http://www.google.com/" target="_blank"><s:span color="0xCECB02" textDecoration="none">Something and Something</s:span></s:a>
        </s:TextFlow>
    </s:textFlow>
</s:TextArea>

That works, but how can i take the same "{links.comment}" from MySql!?


Solution

  • If you are getting data as an tag format you can solve it by below way: -

    <s:TextArea color="0xCECB02" textDecoration="none" textFlow ="{TextFlowUtil.importFromString(links.comment, WhiteSpaceCollapse.PRESERVE)}"/>