Skip to content

@binnyg /gist:945183
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
RTE inside modal dialog
<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:f="http://orbeon.org/oxf/xml/formatting" xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:widget="http://orbeon.org/oxf/xml/widget"
xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes"
xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:fr="http://orbeon.org/oxf/xml/form-runner">
<xhtml:head>
<xforms:model id="main"
xxforms:session-heartbeat="true"
xxforms:show-error-dialog="true">
<xforms:instance id="instance">
<dynamic>
<textarea1>Area1</textarea1>
<textarea2>Area2</textarea2>
</dynamic>
</xforms:instance>
<xforms:instance id="instance-modal-path">
<root>
<selectedNode></selectedNode>
</root>
</xforms:instance>
</xforms:model>
</xhtml:head>
<xhtml:body class="body">
<xforms:input ref="textarea1">
<xforms:label>Text Area 1</xforms:label>
<xxforms:show ev:event="DOMFocusIn" dialog="hello-dialog"></xxforms:show>
</xforms:input>
<xhtml:br />
<xforms:input ref="textarea2">
<xforms:label>Text Area 2</xforms:label>
<xforms:setvalue ev:event="DOMFocusIn" ref="instance('instance-modal-path')/selectedNode" value="context()/saxon:path()" />
<xxforms:show ev:event="DOMFocusIn" dialog="hello-dialog"></xxforms:show>
</xforms:input>
<xxforms:dialog id="hello-dialog">
<xhtml:div>
<xforms:textarea mediatype="text/html" ref="if(normalize-space(xxforms:instance('instance-modal-path')/selectedNode) != '') then saxon:evaluate(instance('instance-modal-path')/selectedNode) else instance('instance')/textarea1" />
</xhtml:div>
</xxforms:dialog>
</xhtml:body>
</xhtml:html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.