Running framework code on document open event

<oXygen/> general issues.
peterls
Posts: 9

Running framework code on document open event

Wed Nov 09, 2016 4:12 pm

I've got a custom framework that defines several operations users can invoke from menus or through hotkeys. For example an operation could be to contact an external web service and insert an XML fragment in the current document based on the response.

What I need now is to invoke one of those operations automatically whenever a new document (that is associated with that framework) is opened. Is there a way to do this?

I know I could do it easily via a plugin but I don't want to duplicate my code if it was possible.
mihaela
Posts: 170

Re: Running framework code on document open event

Wed Nov 09, 2016 6:16 pm

Hi,

The only way to invoke the operation when the document is opened is to create a plugin (as you already said).
A custom action can be also invoked through CSS, by using the oxy_action() function, but this action should be associated with a button form control.You cannot invoke it on document open.

Best Regards,
Mihaela
Mihaela Calotescu
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 1 guest