FLEX 4:使用textarea TextConverter在spark中导入html

发布于 2024-09-01 22:27:59 字数 341 浏览 1 评论 0原文

我已经使用 Textconverter 将 Html 文本导入到 textarea 中,效果很好,但我有一个问题 如果导入的 html 中的图像不再在线或根本不存在,我需要标记“未找到图像”,所以如果有人可以帮助我......

谢谢

es。

            var string:String = '<img src="elvis.gif" />';
            aTextArea.textFlow = TextConverter.importToFlow(string, TextConverter.TEXT_FIELD_HTML_FORMAT);

I have imported a Html text into textarea using Textconverter and it works well, but I have a problem
I need to mark with "image not found" if and image inside into imported html isn't more online or simply don't exist, so if anybody can help me...

Thanks

es.

            var string:String = '<img src="elvis.gif" />';
            aTextArea.textFlow = TextConverter.importToFlow(string, TextConverter.TEXT_FIELD_HTML_FORMAT);

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

所谓喜欢 2024-09-08 22:27:59

我不认为这是 TLF 开箱即用的选项。

如果我是你,我会首先使用 URLLoader 检查图像是否存在。
如果不存在,请将字符串中的 img 标记替换为错误消息。

I don't think this is an option that comes out of the box with TLF.

If I were you, I would check first if the image exists using URLLoader.
If it doesn't exist, replace your img tag in your string with an error message.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文