Forum OpenACS Development: list of plugin for xinha on xowiki-forms

There is a parameter in acs-templating with a list of default plugins for xinha. Should xowiki use these default list of plugins ? I just noticed that xowiki-forms has the list hard coded. We could fetch it from the acs-templating parameter.

{f.text
{text:richtext(richtext),nospell,optional
{label Content}
{options {editor xinha plugins {
GetHtml CharacterMap ContextMenu FullScreen InsertAnchor
ListType TableOperations EditTag LangMarks Abbreviation OacsFs
} height 350px
}}
{html {rows 15 cols 50 style {width: 100%}}}}
}

*********

{f.text
{text:richtext(richtext),nospell,optional
{label Content}
{options {editor xinha plugins {
[parameter::get_from_package_key -package_key "acs-templating" -parameter "XinhaDefaultPlugins" -default "GetHtml CharacterMap ContextMenu FullScreen InsertAnchor ListType TableOperations EditTag LangMarks Abbreviation OacsFs"]
} height 350px
}}
{html {rows 15 cols 50 style {width: 100%}}}}
}

Collapse
Posted by Hamilton Chua on
I guess we can also be flexible in cases where we want xowiki to have a different set of xinha plugins from the rest of the site by creating a parameter to hold a default list just for a given instance of xowiki.
Collapse
Posted by Hamilton Chua on
If we create a parameter say "XowikiXinhaDefaultPlugins" and fill it with the comma separated list of xinha plugins that xowiki uses right now.

It would look something like below

***************

{f.text
{text:richtext(richtext),nospell,optional
{label #xowiki.content#}
{options {editor xinha plugins {
[parameter::get -parameter "XowikiXinhaDefaultPlugins" -default [parameter::get_from_package_key -package_key "acs-templating" -parameter "XinhaDefaultPlugi
ns"]]
} height 350px
}}
{html {rows 15 cols 50 style {width: 100%}}}}
}

**************

Furthermore, if user blanks the parameter it will default tothe acs-templating parameter.

Collapse
Posted by Gustaf Neumann on
Hamilton, are you aware that you can define the list of plugins per xowiki instance? See:
http://media.wu-wien.ac.at/download/xowiki-doc/index.html#js

note as well, that starting with xowiki 0.30 xowiki has a multi level configuration: highest precedence have the values in the folder object (these are programmable, can be in principle inherited, computed, etc.) followed by parameters from the package. For more complex configurations, the one-liner field in package parameters is not well suited. If you use a more elaborated configuration, you are most likely configuring the toolbar as well, or you are configuring the stylist (see. the multiple choice example in the documentation above). So, i am not sure, whether the package parameters in the current fashion are suitable for this...