Hi,

In order to customize WYSIWYSG editor only on some pages I have made following changes in wysiwyg_storeConfig macro:

  #macro(wysiwyg_storeConfig $parameters $editedDocument $fieldId $full)
  ...
  #if($xcontext.contains('wysiwyg_overriding_parameters'))
#set($ok = $parameters.putAll($xcontext.putAll('wysiwyg_overriding_parameters')))
  #end
  ...
 #end

Part of sheet for these pages looks like this:

  #set($overriding_parameters = $util.hashMap)
  #set($ok = $overriding_parameters.put('plugins', ...))
  #set($ok = $overriding_parameters.put('menu', ...))
  #set($ok = $overriding_parameters.put('toolbar', ...))
#set($ok = $xcontext.put('wysiwyg_overriding_parameters', $overriding_parameters))

This is good enough for editors on previously created pages. Editors look (in inline mode) just the way I want. But, on new pages editors always use default configuration.

To test these unexpected result I added following two lines in the sheet:

  #set($ok = $xcontext.put('foo', 'bar'))
  $xcontext.get('foo')

On new pages $xcontext.get('foo') is displayed, and on existing ones it is bar.

(Version 3.1)

Thanks,
Ozren

_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to