AuthorMode, open selected word in default app (browser)

Dear list, I am working on an author mode/document type framework and I would like to allow my users to select a word and open a browser with the selected word at some place in the url. (like e.g. http://www.perseus.tufts.edu/hopper/morph?l=MYFUNNYWORD&la=la). Can I achieve this with the ro.sync.ecss.extensions.commons.operations.OpenInSystemAppOperation operation, and if so, what should its parameters be? (Ideally, a somewhat similar command could open a default link for the current document, the ID of which it would read from some XPath. E.g. google for the title and author of the current document.) Thank you, Andreas -- Dr. Andreas Wagner Project "The School of Salamanca" Academy of Sciences and Literature, Mainz and Institute of Philosophy Goethe University Frankfurt http://salamanca.adwmainz.de Grüneburgplatz 1 (Pf 116, R. 2.455) 60629 Frankfurt am Main Tel. +49 (0)69/798-32774 Fax +49 (0)69/798-32794

Hi Andreas, For the first use case you could probably use the predefined operation called "ro.sync.ecss.extensions.commons.operations.ShowElementDocumentationOperation" which takes an URL parameter that can be set by you to the value:
http://www.perseus.tufts.edu/hopper/morph?l=${selection}&la=la
where the "${selection}" editor variable will be expanded to the text selected in the Author visual editing mode. If you need anything more complex, you can create your own custom Java operation extending "ro.sync.ecss.extensions.api.AuthorOperation" and use our API. The Java code for both "ro.sync.ecss.extensions.commons.operations.OpenInSystemAppOperation" and "ro.sync.ecss.extensions.commons.operations.ShowElementDocumentationOperation" should be in our Author SDK project:
http://www.oxygenxml.com/oxygen_sdk.html#XML_Editor_Authoring_SDK
Regards, Radu Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 3/24/2014 4:13 PM, Andreas Wagner wrote:
Dear list,
I am working on an author mode/document type framework and I would like to allow my users to select a word and open a browser with the selected word at some place in the url. (like e.g. http://www.perseus.tufts.edu/hopper/morph?l=MYFUNNYWORD&la=la).
Can I achieve this with the ro.sync.ecss.extensions.commons.operations.OpenInSystemAppOperation operation, and if so, what should its parameters be?
(Ideally, a somewhat similar command could open a default link for the current document, the ID of which it would read from some XPath. E.g. google for the title and author of the current document.)
Thank you,
Andreas
participants (2)
-
Andreas Wagner
-
Oxygen XML Editor Support