Forum OpenACS Q&A: Re: xowiki Folder Object

16: Re: xowiki Folder Object (response to 15)
Posted by Gustaf Neumann on
glad, that this works. The form constraints are obviously not the best way to pass javascript. On the longer range, we should find a better way of providing these. The formfields contain already a "slim" configuration for xinha, and the way should be to extend this further.

Concerning square brackets for javascript arrays: i have tested the example above (14) before posting, and it works nicely.

17: Re: xowiki Folder Object (response to 16)
Posted by Richard Hamilton on

That is strange. I have just tried this again by creating a test form with a single field on it. I have copied your code from the forum post and I receive this error:

Error in field Form Constraints: Form constraint contains invalid characters

Could it be that the form validation on my setup is different for some reason? Is your form validation set to the default?

Content:  @test_var@

Form:  <form>@test_var@</form>

Form Constraints:  {test_var:richtext,editor=xinha,javascript=
xinha_config.toolbar = [
    ['popupeditor'__COMMA__ 'bold'__COMMA__'italic'__COMMA__'createlink'__COMMA__'insertimage'__COMMA__'separator']__COMMA__


18: Re: xowiki Folder Object (response to 17)
Posted by Gustaf Neumann on
you are right, it should complain, but does not on my local machine... i have always a lot of experimental code hanging around, so there must be somewhere a bad interaction...
19: Re: xowiki Folder Object (response to 16)
Posted by Richard Hamilton on
I was just today re-visiting my confusion on this issue. I think I finally understand that the Xowiki instance 'Xinha WidgetSpec' parameter only configures Xinha for the forms used to create or edit xowiki objects.

I now finally understand that adding a xinha config to a formfield spec is the only way currently to configure the editor for Xowiki.Form fields.

In my current experiment, where I have several textarea fields that all need xinha activated with the same configuration, this is very verbose and repetitive.

It would be great to have the ability to set a default spec for xinha for use when filling-out/ creating instances of Xowiki.Forms.


20: Re: xowiki Folder Object (response to 19)
Posted by Richard Hamilton on