将节点引用传递给 orbeon 中的模式对话框
我正在尝试拥有一个 RTE 实例,并将其重用于页面上需要富文本编辑的所有控件。我有两个文本区域,当我专注于其中一个文本区域时,我想打开模式对话框,并且我想传递选定的节点引用。
示例位于 https://gist.github.com/945183
打开模式对话框很简单,但我该如何做通过参考?
谢谢 比内什·古马迪
I am trying to have one instance of RTE and reuse it for all controls on the page which require rich text editing. I have two textareas and when I focus into one of the text areas I would like to open the modal dialog and I would like to pass the selected node reference.
Example is at https://gist.github.com/945183
Opening modal dialog is simple but how do I pass the reference?
Thank you
Binesh Gummadi
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如您所做的那样,将指针传递给要作为 XPath 表达式进行编辑的节点是一个好方法。我更新了您链接到的代码:我使它变得更简单,让它工作,并粘贴了下面的结果。
或者,您可以传递要编辑的控件的 ID。然后在对话框中,将其存储在实例中,并使用
xxforms:binding()
查找绑定到该控件的节点。Passing a pointer to the node to edit as an XPath expression, as you did, is a good way to go. I updated the code you were linking to: I made it a bit simpler, got it to work, and pasted the result below.
Alternatively, you could pass the id of the control you want to edit. Then in the dialog, store this in an instance, and uses
xxforms:binding()
to find the node bound to that control.