开发者

How to use flex-htmlfilter?

I can't seem to find any sort of documentation about usage of flex-htmlfilter? Can anyone be kind enough to give me a few sample usage of it? Like, how do I use HTML codes from external pages? E.g. I want to pull the content of the flex-htmlfilter f开发者_运维技巧rom an external php file.


I'm not sure if you've found an answer by now, but the code below worked for me:

import com.htmlFilter.htmlFilter;
private var theHtmlFilter:htmlFilter = new htmlFilter();      

[Bindable]
private var theText:String = theHtmlFilter.filterContent("<p>nothing
important</p><ol><li>item</li><li>item</li><li>item</li></ol>");

Make sure you have the flex-htmlfilter.swc in your libs folder/build path, and then import the custom htmlText component and set the text property to the string "theText." You could pull the compatible html code from your php app and filter it using this technique.

xmlns:custom="com.htmlFilter.*"

<custom:htmlText id="customText"
    bottom="0"
    verticalScrollPolicy="off"
    text="{theText}"
    cssFile="styles.css"
    width="100%"/>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜