将富文本粘贴到 Flash 中?
粘贴到 Flash 时是否可以捕获富文本?使用 Flex TextEditArea,我可以在 Flash 本身中粘贴格式丰富的文本,但如果我尝试从外部源(例如网页、Microsoft Word 等)粘贴,它会以纯文本形式出现。反之亦然:如果我从 Flash 中复制富文本并粘贴到外部源,它会以纯文本形式显示。
Is it possible to capture rich text when pasting into Flash? Using a Flex TextEditArea, I can paste richly formatted text within Flash itself, but if I try to paste from an external source (say web page, microsoft word, etc) it comes in as plain text. Same for the reverse: if I copy rich text from within Flash, and paste to an external source, it goes out as plain text.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我已经完成了一半,到目前为止我已经得到了这个:
它进行了一些格式化。但是现在字体大小存在问题 - 任何非默认字体大小的内容都非常小。正常字体保持正常。大字体变成小字体。小字体变成 1 像素高的点。
I'm part way there, so far I've got this:
It gets some formatting in. But now there's a problem with font size -- anything that's not a default font size, is extremely tiny. Normal font stays normal. Large fonts become tiny fonts. Small fonts become 1-pixel high dots.
看看 TinyMCE 或其他编辑器,他们有粘贴单词文本的选项,也许你可以看看他们是如何解析它并模拟它的。如果您可以针对 Flex4 Flash Player 10,您可以查看 http://labs.adobe.com/ Technologies/textlayout/ 这可能会对您有所帮助,因为 adobes 论坛上的这篇文章指出
have a look at TinyMCE or some other editor, they have options for pasting word text, perhaps you might be able look at how their parsing it and emulate that. If you can target flex4 flash player 10 you might have a look at http://labs.adobe.com/technologies/textlayout/ which might help you as this post on adobes forums states