问题
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!?
回答1:
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)}"/>
来源:https://stackoverflow.com/questions/13467313/flex-any-way-to-use-something-like-htmltext-in-spark-textarea