Previously I have gotten the YUI rich text editor to work fine in one text area with my XForms document. Now I'd like to try and see if I can have multiple text areas access an instance of the YUI RTE within the same XForms document.
So I first tried running yuitest.xhtml (attached below) in the XForms Sandbox, which did not have any XForms code in it. It worked like it should, bringing up the YUI RTE whenever a box is double clicked. Then I tried running yuitest_withmodel.xhtml (also attached below), which is the same exact code but has an <xf:model /> tag set added. This code failed in the sandbox, but when I view the source, copy it to an external XHTML file, and run it in Firefox, the YUI functionality works fine again. I'm not sure I understand exactly what's going on here, and if there's a way to implement this sort of multiple YUI RTE functionality within Orbeon. Both of my XHTML documents have a Javascript that originates from the following site: http://developer.yahoo.com/yui/examples/editor/multi_editor.html yuitest.xhtmlyuitest_withmodel.xhtml ---Philip |
Administrator
|
Philip,
On Apr 29, 2009, at 12:59 PM, Philip.Cantin wrote: > Previously I have gotten the YUI rich text editor to work fine in > one text > area with my XForms document. Now I'd like to try and see if I can > have > multiple text areas access an instance of the YUI RTE within the > same XForms > document. I am curious: is there a reason why you are not using an <xforms:textarea mediatype="text/html">, which will in turn use the YUI RTE without you having to write any JavaScript? Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ -- 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 |
Alex,
Yes, the reason I'm not using that method is because I want to customize the YUI rich text editor to only include certain buttons, so I thought it was necessary to manually render the editor by directly importing the proper YUI source files, and using Javascript to override the toolbar configuration. Is there a way I can change my code from earlier to have multiple, non-default YUI RTEs that work well within Orbeon? ---Philip
|
Finally figured it out! It was all a matter of following the advice given by Erik here:
http://www.nabble.com/yui-rich-text-editor---extracss--td21051416.html#a21051416 and following the steps for Javascript development here: http://wiki.orbeon.com/forms/doc/contributor-guide/javascript-development The reason I couldn't follow Erik's advice before was because I could never find the ORBEON.widgets.RTE package he was talking about. This was because I had a build of Orbeon 3.7 that did not even have YUI RTE support yet. What confused me more was that I had incorrectly assumed that, since Orbeon already had built-in YUI capability since the 3.7 beta, it would also have capability for the YUI RTE, which was not integrated into Orbeon until January 2009. My previous build dated back to August 2008. So after upgrading to the latest nightly build, following the steps in the Javascript Development guide (as well as editing the xforms.js file to take out some of the toolbar functions), and restarting Tomcat, everything worked like a charm! ---Philip <quote author="Philip.Cantin"> Alex, Yes, the reason I'm not using that method is because I want to customize the YUI rich text editor to only include certain buttons, so I thought it was necessary to manually render the editor by directly importing the proper YUI source files, and using Javascript to override the toolbar configuration. Is there a way I can change my code from earlier to have multiple, non-default YUI RTEs that work well within Orbeon? ---Philip |
Administrator
|
Great to hear this!
-Erik On Apr 30, 2009, at 8:53 AM, Philip.Cantin wrote: > > Finally figured it out! It was all a matter of following the advice > given by > Erik here: > > http://www.nabble.com/yui-rich-text-editor---extracss--td21051416.html#a21051416 > > > and following the steps for Javascript development here: > > > http://wiki.orbeon.com/forms/doc/contributor-guide/javascript-development > > > The reason I couldn't follow Erik's advice before was because I > could never > find the ORBEON.widgets.RTE package he was talking about. This was > because I > had a build of Orbeon 3.7 that did not even have YUI RTE support > yet. What > confused me more was that I had incorrectly assumed that, since Orbeon > already had built-in YUI capability since the 3.7 beta, it would > also have > capability for the YUI RTE, which was not integrated into Orbeon until > January 2009. My previous build dated back to August 2008. > > So after upgrading to the latest nightly build, following the steps > in the > Javascript Development guide (as well as editing the xforms.js file > to take > out some of the toolbar functions), and restarting Tomcat, > everything worked > like a charm! > > > ---Philip > > > Alex, > > Yes, the reason I'm not using that method is because I want to > customize the > YUI rich text editor to only include certain buttons, so I thought > it was > necessary to manually render the editor by directly importing the > proper YUI > source files, and using Javascript to override the toolbar > configuration. > > Is there a way I can change my code from earlier to have multiple, > non-default YUI RTEs that work well within Orbeon? > > ---Philip > > -- > View this message in context: http://www.nabble.com/having-multiple-instances-of-the-YUI-RTE-to-work-within-XForms-code-tp23301531p23319132.html > Sent from the ObjectWeb OPS - Users mailing list archive at > Nabble.com. > > > -- > 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 Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 |
Free forum by Nabble | Edit this page |