removing target=_blank from links that are set to external scope
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 167
- Joined: Tue Mar 06, 2018 1:34 am
removing target=_blank from links that are set to external scope
I have some xrefs that point to a place somewhere else on the server, using "../../OtherFolder/File.html" notation. Everything works fine. However, I really don't want these opening in a new tab...however, Oxygen seems to want to add the target=_blank in the HTML to anything that has scope = external in the XML. How can I change this?
-
- Posts: 81
- Joined: Wed Jul 20, 2016 8:22 am
Re: removing target=_blank from links that are set to external scope
Post by mihai_coanda »
Hello,
To achieve your goal you can use sync.api.Editor.EventTypes.LINK_OPENED like in the following snippet:
You might want to better tune the detection of links that should opened in the current tab according to your usecase.
Best Regarda,
Michael
To achieve your goal you can use sync.api.Editor.EventTypes.LINK_OPENED like in the following snippet:
Code: Select all
goog.events.listen(workspace, sync.api.Editor.EventTypes.LINK_OPENED, function(e) {
if(e.external) {
e.linkTarget = sync.api.Editor.LinkOpenedEvent.Target.SELF;
}
});
Best Regarda,
Michael
Michael
https://www.oxygenxml.com
https://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service