Forum OpenACS Q&A: xinha - displaying optional params

Collapse
Posted by Avni Khatri on
Hi -

I am running OACS 5.2.3 + oracle 9i on macosx, firefox.
Trying to get some of the xinha buttons to not appear.

From the docs, it looks like this should work:

ad_form -name "test123" -method post -form {
    {body:richtext(richtext) {label "Body: "} {{options {editor xinha plugins {CharacterMap FullScreen ListType TableOperations}
        javascript {
            xinha_config.toolbar = [['popupeditor', 'bold','italic','createlink','insertimage','separator'],['killword','removeformat'] ];}}}}
        {html {rows 12 cols 50 wrap soft}}
    }
}

But all the options are displayed.
I haven't tested on any other browsers, OSes yet.

Has anyone done this?
Thanks.

Collapse
Posted by Dave Bauer on
You an pass in plugins as an option to the xinha widget.

like this:

{text:richtext(richtext),nospell,optional
	    {label #xowiki.content#}
	    {options {editor xinha plugins {
	      GetHtml CharacterMap ContextMenu FullScreen
	      ListType TableOperations EditTag LangMarks Abbreviation OacsFs
	    } height 350px}}
	    {html {rows 15 cols 50 style {width: 100%}}}}
Collapse
Posted by Avni Khatri on
I think that is what I am doing? Look at my example above.

1. as far as the plugins go, let's say I remove OacsFS. The image upload button still shows up?

2. According to here: https://openacs.org/api-doc/proc-view?proc=template%3a%3awidget%3a%3arichtext

I should be able to pass in a "javascript" option and customize even further?
But nothing changes when I remove / add options from the toolbar?

I checked the richtext proc and it looks like there is code to handle the options, but it doesn't seem to called?? (might be wrong about this)

Thanks,
Avni