Correct me if I'm wrong-- I'm pretty sure there is currently no way without patching to modify any YUI RTE related configuration.
It would be really useful to be able to define a piece of JSON in config that would be used for the toolbar as well as whether an Editor or SimpleEditor should be used. |
I've created the attached patch for xforms.js which
uses a similar mechanism to that for the FckEditor to check for the
presence of a custom configuration for the YUI RTE and uses that if it
is present, otherwise uses the default.
Unfortunately this patch is based on the 200901310233 tag rather than the latest, but hopefully it is easy enough to incorporate the change if you think it is worthwhile. To use this patched version, if there is a javascript object in the variable YUI_RTE_CUSTOM_CONFIG at the time the form is initialised then that will be used as the configuration for the YUI Rich Text Editor. If no such variable is defined then an empty configuration object will be used, as before. Dave Mc Stefan du Fresne wrote: Correct me if I'm wrong-- I'm pretty sure there is currently no way without patching to modify any YUI RTE related configuration. It would be really useful to be able to define a piece of JSON in config that would be used for the toolbar as well as whether an Editor or SimpleEditor should be used. --
This
e-mail and any attachments are intended only for the person to whom it
is addressed
and may contain privileged, proprietary, or other data protected from
disclosure
under applicable law. If you are not the addressee or the person
responsible
for delivering this to the addressee you are hereby notified that
reading, copying
or distributing this transmission is prohibited. If you have received
this e-mail
in error, please telephone us immediately and remove all copies of it
from your
system. Thank you for your co-operation.
*** clean/src/resources-packaged/ops/javascript/xforms.js Fri Jan 30 10:58:12 2009 --- src/local/resources-packaged/ops/javascript/xforms.js Wed Feb 11 10:48:33 2009 *************** *** 3240,3247 **** */ init: function(control) { ! // Create RTE object ! var yuiRTE = new YAHOO.widget.Editor(control, { // Don't set width/height (done in CSS) ! }); // Register event listener for user interacting with the control yuiRTE.on("editorKeyUp", function() { changeEvent(control.id); }); --- 3240,3253 ---- */ init: function(control) { ! // Create RTE object, using a default config unless YUI_RTE_CUSTOM_CONFIG is defined ! var config = { // Don't set width/height (done in CSS) ! }; ! var yui_config_type_check = typeof YUI_RTE_CUSTOM_CONFIG; ! if (yui_config_type_check != 'undefined') { ! config = YUI_RTE_CUSTOM_CONFIG; ! } ! ! var yuiRTE = new YAHOO.widget.Editor(control, config); // Register event listener for user interacting with the control yuiRTE.on("editorKeyUp", function() { changeEvent(control.id); }); -- 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 |
Administrator
|
Dave,
Thanks for the patch. Added it to our list. -Erik On Feb 10, 2009, at 2:05 PM, Dave McIntyre wrote: > I've created the attached patch for xforms.js which uses a similar > mechanism to that for the FckEditor to check for the presence of a > custom configuration for the YUI RTE and uses that if it is present, > otherwise uses the default. > > Unfortunately this patch is based on the 200901310233 tag rather > than the latest, but hopefully it is easy enough to incorporate the > change if you think it is worthwhile. > > To use this patched version, if there is a javascript object in the > variable YUI_RTE_CUSTOM_CONFIG at the time the form is initialised > then that will be used as the configuration for the YUI Rich Text > Editor. If no such variable is defined then an empty configuration > object will be used, as before. > > Dave Mc > > Stefan du Fresne wrote: >> >> Correct me if I'm wrong-- I'm pretty sure there is currently no way >> without >> patching to modify any YUI RTE related configuration. >> >> It would be really useful to be able to define a piece of JSON in >> config >> that would be used for the toolbar as well as whether an Editor or >> SimpleEditor should be used. >> > > -- > <orion150.gif> > > Dave McIntyreSoftware Developer > [hidden email] > P: +64 9 638 0600 > M: +64 21 212 8087 > F: +64 9 638 0699 > S: dave.mcintyre > www.orionhealth.com > > > This e-mail and any attachments are intended only for the person to > whom it is addressed and may contain privileged, proprietary, or > other data protected from disclosure under applicable law. If you > are not the addressee or the person responsible for delivering this > to the addressee you are hereby notified that reading, copying or > distributing this transmission is prohibited. If you have received > this e-mail in error, please telephone us immediately and remove all > copies of it from your system. Thank you for your co-operation. > *** clean/src/resources-packaged/ops/javascript/xforms.js Fri Jan 30 > 10:58:12 2009 > --- src/local/resources-packaged/ops/javascript/xforms.js Wed Feb 11 > 10:48:33 2009 > *************** > *** 3240,3247 **** > */ > init: function(control) { > ! // Create RTE object > ! var yuiRTE = new YAHOO.widget.Editor(control, { > // Don't set width/height (done in CSS) > ! }); > // Register event listener for user interacting with > the control > yuiRTE.on("editorKeyUp", function() > { changeEvent(control.id); }); > --- 3240,3253 ---- > */ > init: function(control) { > ! // Create RTE object, using a default config unless > YUI_RTE_CUSTOM_CONFIG is defined > ! var config = { > // Don't set width/height (done in CSS) > ! }; > ! var yui_config_type_check = typeof > YUI_RTE_CUSTOM_CONFIG; > ! if (yui_config_type_check != 'undefined') { > ! config = YUI_RTE_CUSTOM_CONFIG; > ! } > ! > ! var yuiRTE = new YAHOO.widget.Editor(control, config); > // Register event listener for user interacting with > the control > yuiRTE.on("editorKeyUp", function() > { changeEvent(control.id); }); > > -- > 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 |