在我的flex项目中,我使用XML来填充TextFlow,使用:
TextFilter.importToFlow(XML(str), TextFilter.PLAIN_TEXT_FORMAT);我想将html链接添加到文本流中。为此,我在xml中添加了html标记,但我得到了解析器错误(格式错误的xml)。
var fixed:String;
fixed = fixed.replace(link, "<a href='event:xyz' >"+link+"</a>");
XML:
<TextFlow xmlns="http://ns.adobe.com/textLayout/2008"/>
added link as <a href='event:xyz' >link</a>
</TextFlow>发布于 2009-04-22 13:14:17
尝试将您的TextFilter.PLAIN_TEXT_FORMAT更改为TextFilter.TEXT_LAYOUT_FORMAT。
https://stackoverflow.com/questions/777101
复制相似问题