The WYSIWYG editor doesn't execute the JavaScript code inside the editing area by default. If you need this then you need to:

  • Enable the loading of the JavaScript Skin Extensions from the WYSIWYG editor administration section
  • Mark the scripts that are safe to be loaded inside the editing area:
    #set ($discard = $xwiki.jsx.use('Path.To.MyMacro', {'wysiwyg': true}))

Check the CKEditor Integration documentation for more information.

Tags:
   

Get Connected