Page 1 of 1

Open the link in the topic dita with our own CMS URL

Posted: Tue Aug 14, 2018 7:21 am
by dangoakachan
We integrated the oxygen web author into our CMS system, and now we have a problem that needs to be solved, but we don't know how to do.

Scenes:
When we open the dita file in our CMS,and click on the link(like xref tag),a new tab including the oxygen editor will be opened, which jump out our CMS system. But we hope to change this behavior, open the corresponding CMS address of the dita file instead. How can I do?Are there any settings to change the default behavior?

Re: Open the link in the topic dita with our own CMS URL

Posted: Tue Aug 14, 2018 9:05 am
by cristi_talau
Hello,

Opening links in a new tab is the default behavior of Web Author when clicking links. You can customize it by using the JavaScript API [1] and listening to "LINK_OPENED" events [2].

You can call "e.preventDefault()" on the event and handle link opening by yourself, e.g. change the "src" attribute of the "iframe".

Best,
Cristian

[1] https://www.oxygenxml.com/doc/versions/ ... ng_js.html
[2] https://www.oxygenxml.com/maven/com/oxy ... Event.html

Re: Open the link in the topic dita with our own CMS URL

Posted: Tue Aug 14, 2018 9:33 am
by dangoakachan
cristi_talau wrote:Hello,

Opening links in a new tab is the default behavior of Web Author when clicking links. You can customize it by using the JavaScript API [1] and listening to "LINK_OPENED" events [2].

You can call "e.preventDefault()" on the event and handle link opening by yourself, e.g. change the "src" attribute of the "iframe".

Best,
Cristian

[1] https://www.oxygenxml.com/doc/versions/ ... ng_js.html
[2] https://www.oxygenxml.com/maven/com/oxy ... Event.html
Thank you for your reply, we will try this method.