Page 1 of 1

Require user to confirm global changes

Posted: Sat Dec 14, 2019 1:51 am
by mboudreau
I have created a pair of Actions for editing a journal article:
  • Convert CURRENT underline element to italic
  • Convert ALL underline elements to italic
If the user chooses the "Convert ALL" action, I'd like to present a confirmation dialog that warns this is a global action that cannot be undone. Is there a way to do this, similar to using the ${ask()} editor variable?

Re: Require user to confirm global changes

Posted: Mon Dec 16, 2019 11:28 am
by Radu
Hi,

There is an Author default operation called JSOperation which can be called from an Author action and which can use Javascript code to call various Java APIs from Oxygen:

https://www.oxygenxml.com/doc/versions/ ... soperation

It can also show a Java JOptionPane asking the end user various things. There is a sample project here showing various use cases:

https://github.com/oxygenxml/javascript ... operations

Regards,
Radu