flex TextLayoutFramework TextScrap 如何访问 PasteOperation 的 textFlow

发布于 2024-09-15 06:28:31 字数 466 浏览 8 评论 0原文

读完后 http://livedocs.adobe.com/labs/textlayout/ flashx/textLayout/edit/TextScrap.html

flashx.textLayout.edit.TextScrap 应该有一个公共[只读]属性textFlow

但它受到保护flex_sdk_4.1.0.16076...

有人知道如何访问粘贴的 TextFlow 吗?

Clipboard.generalClipboard.getData("TEXT_LAYOUT_MARKUP") 仅返回 XML - 不返回对象...

after reading
http://livedocs.adobe.com/labs/textlayout/flashx/textLayout/edit/TextScrap.html

flashx.textLayout.edit.TextScrap should have a public [read-only] property textFlow

but it is protected in flex_sdk_4.1.0.16076...

does anybody know how to access a pasted TextFlow?

Clipboard.generalClipboard.getData("TEXT_LAYOUT_MARKUP") returns only a XML - not the objects...

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

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

发布评论

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

评论(1

时光倒影 2024-09-22 06:28:31

我假设这被粘贴到 RichEditableText 组件中?

如果是这样,您将监听 TextOperationEvent.CHANGING 事件将有一个 您可以使用 FlowOperation 来引用 TextFlow。在执行此操作之前,您将检查 if(FlowOperation is PasteOperation)。这也可以通过侦听“更改”来捕获更新后,但如果需要,您将无法操纵该操作(我假设这就是您需要访问流对象的原因)。

I'm assuming this is being pasted into a RichEditableText component?

If so, you would listen for a TextOperationEvent.CHANGING event which will have a FlowOperation that you can use to reference the TextFlow. You will to check if(FlowOperation is PasteOperation) before doing so. This can also be captured post update by listening for "change", but then you won't be able to manipulate the operation if needed (which I'm assuming is why you need to access the flow object).

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