how to launch an xml file in Oxygen using javascript

juliet
Posts: 1
Joined: Thu Aug 18, 2022 6:43 pm

how to launch an xml file in Oxygen using javascript

Post by juliet »

I need to launch a file in Oxygen from the file system using javascript. I have the file path, just need to know the way to launch it. From the API, I found "authorAccess.getEditorAccess()" and "authorAccess.getUtilAccess()", but cannot find any information beyond that.
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: how to launch an xml file in Oxygen using javascript

Post by Radu »

Hi,

The ""authorAccess.getEditorAccess()" and "authorAccess.getUtilAccess()"," API methods you mentioned can be used as part of the larger Oxygen API by Oxygen plugins, so by plugins which are installed in Oxygen.
But your situation is different, you want to start the Oxygen application from a Javascript file. Or is Oxygen already started and you want to open a file inside it?
If you were to use a command line to start Oxygen, you can pass to the started Oxygen process a reference to the file that you want to have opened:

https://www.oxygenxml.com/doc/ug-editor ... m-cli.html

Maybe you can google for this: https://www.google.com/search?q=javascr ... pplication
From what I think to be able to open an application from Javascript you would need to install some custom browser specific extension, otherwise Javascript runs in a sandbox and cannot open applications.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: how to launch an xml file in Oxygen using javascript

Post by Radu »

Or do you instead have an Oxygen plugin implemented in Javascript or a custom Author action implemented using a JSOperation?
It would help if you gave me more context.
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply