Posted by
David Voňka on
Jan 27, 2010; 7:48pm
URL: https://discuss.orbeon.com/rich-text-editor-in-xf-repeat-tp1312049.html
Hello,
the yui rich text editor does not seem to work correctly when inserted
dynamically into a xf:repeat block.
Example:
-------------
<html xmlns="
http://www.w3.org/1999/xhtml"
xmlns:xf="
http://www.w3.org/2002/xforms"
xmlns:ev="
http://www.w3.org/2001/xml-events"
xmlns:xs="
http://www.w3.org/2001/XMLSchema"
xmlns:xxf="
http://orbeon.org/oxf/xml/xforms"
xmlns:fr="
http://orbeon.org/oxf/xml/form-runner"
xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
lang="en">
<head>
<xf:model id="data-model">
<xf:instance id="texty">
<data xmlns="">
<text>hi</text>
<text>hello</text>
</data>
</xf:instance>
</xf:model>
</head>
<body>
<xf:trigger>
<xf:label>New</xf:label>
<xf:insert ev:event="DOMActivate"
nodeset="instance('texty')/text"
at="index('rte-repeat')"
position="after"/>
</xf:trigger>
<ul>
<xf:repeat nodeset="instance('texty')/text" id="rte-repeat">
<li>
<xf:textarea ref="." style="width:600px"
mediatype="text/html">
<xf:label>Rich Text</xf:label>
</xf:textarea>
</li>
</xf:repeat>
</ul>
<widget:xforms-instance-inspector
xmlns:widget="
http://orbeon.org/oxf/xml/widget"/>
</body>
</html>
The two pre-existing editors work ok. But if you add one by pressing
the "new" button, someting goes wrong.
In our application, where Orbeon is used as filter, a client-side
javascript error is triggered:
this._getDoc().body is undefined
[Break on this error]
}else{R=this._getDoc().body;}}if(R){F=M(...gi,'<span
style="font-weight: bold;"');\n
In Orbeon sandbox, there is no error, but the added field is no
richtext, just a simple text area.
Everything works well for plain textareas, ie if you remove the
mediatype attribute.
Do I do anything wrong or is this a bug ?
Thanks in advance for any inputs,
Regards,
David Vonka
--
You receive this message as a subscriber of the
[hidden email] mailing list.
To unsubscribe: mailto:
[hidden email]
For general help: mailto:
[hidden email]?subject=help
OW2 mailing lists service home page:
http://www.ow2.org/wws