flex TextLayoutFramework TextScrap 如何访问 PasteOperation 的 textFlow
读完后 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设这被粘贴到 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).