How to disable JSX in view mode?

Similar to

#if($context.action == 'edit') 
  doSomething()
#end

Is it possible?

Yes. Use a “load on demand” JSX and use an IF as you wrote for calling the $xwiki.jsx.use(). See https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/SkinExtensionsTutorial/

1 Like

Thanks! :slight_smile: )