Flex4.6 StyleableTextField 忽略
标签
我的移动项目中有一个 StyleableTextField,它使用 .htmlText 属性填充 html 文本。
该标签对我来说工作正常,但简单的换行符或段落会被忽略。对此我能做什么?
基本上,最简单的 HTML 只会显示为一行:
textField.htmlText = "<p>this should be the first line</p><p>this the second one</p>";
同样,输出也是一行。
Flex 3 文档指出这些标签绝对受支持,所以我认为他们只是在新版本中删除了它(这有点荒谬!)。 我不想使用 stagewebview,那么还有什么其他方法可以使用 StyleableTextField 正确格式化 HTML,或者是否有一个简单的替代上述标签的方法?
非常感谢你们!
I've got a StyleableTextField in my mobile project, which gets filled with html text using the .htmlText property.
The tag is working fine for me, but simple line breaks or paragraphs are simply ignored. What can I do about that?
Basically, the simplest HTML will just be displayed as a single line:
textField.htmlText = "<p>this should be the first line</p><p>this the second one</p>";
Again, the output is a single line.
The Flex 3 doc states that those tags are definitely supported, so I reckon they simply removed it in the newer versions (which is kinda ridiculous!).
I don't want to use the stagewebview, so what other ways to I have to properly format HTML using the StyleableTextField, or is there a simple replacement for the aforementioned tags?
Thank you very much guys!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保将
multiline
设置为true
,否则它会将其视为单行文本,从而有效地忽略格式。Make sure that
multiline
is set totrue
, otherwise it will treat it as a single line of text, effectively ignoring the formatting.