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

若如初见. 提交于 2019-12-13 08:25:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!