Hi! I'm new to Orbeon and XForms in general. I'm using the orbeon download
(latest version 3.8 CE) in Eclipse so that I can experiment with the code. With the rich-text (HTML) control, I know how to invoke it (textarea with mediatype="text\html"), but is there an easy way to use the "simple" form of the editor or otherwise customize the toolbar? I've looked at the Yahoo documentation ( http://developer.yahoo.com/yui/editor ) but don't know how I could do with from within Orbeon forms. I'd really like to limit the user to the most basic formatting (bold, underline, italic, font-size) as the stylesheet that would render the XML (using FOP) would only support those few elements. Thanks for any help with this! -- Francis -- 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
-- Francis
|
Hi Francis,
> I'd really like to limit the user to the most basic formatting (bold, > underline, italic, font-size) as the stylesheet that would render the XML > (using FOP) would only support those few elements. i didn't test the following with Orbeon Forms 3.8, but i think it should work. There's a way to customize the YUI RTE by putting a custom config into a JavaScript variable named YUI_RTE_CUSTOM_CONFIG. For example: var YUI_RTE_CUSTOM_CONFIG = { width : '100%', autoHeight : true, // extracss : $customcss, // to define css rules for rte content toolbar : { collapse : true, buttonType : 'basic', buttons : [ { group : 'textstyle', label : 'Font Style', buttons : [ { type : 'push', label : 'Bold CTRL + SHIFT + B', value : 'bold' }, { type : 'push', label : 'Italic CTRL + SHIFT + I', value : 'italic' }, { type : 'push', label : 'Underline CTRL + SHIFT + U', value : 'underline' } ] }, { type : 'separator' }, { group : 'indentlist', label : 'Lists', buttons : [ { type : 'push', label : 'Create an Unordered List', value : 'insertunorderedlist' }, { type : 'push', label : 'Create an Ordered List', value : 'insertorderedlist' } ] } ] } }; If YUI_RTE_CUSTOM_CONFIG is set, it takes precedence over the default config. Just put the YUI_RTE_CUSTOM_CONFIG definition into a JS file that's available to your xforms page (for example by linking it in the HTML head: <xhtml:script type="text/javascript" src="..." /> HTH florian -- 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 |
It works! Thanks very much! Hopefully this applies to all the other
customizations available. On Mon, 17 May 2010 16:00:30 +0200, Florian Schmitt <[hidden email]> wrote: > Hi Francis, > >> I'd really like to limit the user to the most basic formatting (bold, >> underline, italic, font-size) as the stylesheet that would render the XML >> (using FOP) would only support those few elements. > > i didn't test the following with Orbeon Forms 3.8, but i think it should > work. There's a way to customize the YUI RTE by putting a custom config > into a JavaScript variable named YUI_RTE_CUSTOM_CONFIG. For example: > > var YUI_RTE_CUSTOM_CONFIG = { > width : '100%', > autoHeight : true, > // extracss : $customcss, // to define css rules for rte content > toolbar : { > collapse : true, > buttonType : 'basic', > buttons : [ > { > group : 'textstyle', > label : 'Font Style', > buttons : [ { > type : 'push', > label : 'Bold CTRL + SHIFT + B', > value : 'bold' > }, { > type : 'push', > label : 'Italic CTRL + SHIFT + I', > value : 'italic' > }, { > type : 'push', > label : 'Underline CTRL + SHIFT + U', > value : 'underline' > } ] > }, { > type : 'separator' > }, { > group : 'indentlist', > label : 'Lists', > buttons : [ { > type : 'push', > label : 'Create an Unordered List', > value : 'insertunorderedlist' > }, { > type : 'push', > label : 'Create an Ordered List', > value : 'insertorderedlist' > } ] > } > ] > } > }; > > > If YUI_RTE_CUSTOM_CONFIG is set, it takes precedence over the default > config. Just put the YUI_RTE_CUSTOM_CONFIG definition into a JS file > that's available to your xforms page (for example by linking it in the > HTML head: <xhtml:script type="text/javascript" src="..." /> > > HTH > florian Francis -- 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
-- Francis
|
Free forum by Nabble | Edit this page |