WebHelp - File Refeence links open in target="_blank"

rminaker
Posts: 27
Joined: Thu Dec 19, 2013 4:34 pm

WebHelp - File Refeence links open in target="_blank"

Post by rminaker » Tue Apr 28, 2015 11:57 pm

Hi,

I have a WebHelp project with Word, Excel and PDF files reference links. I'd like them all to open in target="_blank" when output to WebHelp (so as to avoid getting a blank page in the WebHelp); however, only the PDF file references seem to do this by default. Is there a way to force .docx and .xlsx to do this as well?

For example, I get this code when both document links areinserted the exact same way.

<a class="xref" href="file1.pdf" target="_blank">file 1</a>
<a class="xref" href="file2.docx">file2</a>

Thanks!

R.

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: WebHelp - File Refeence links open in target="_blank"

Post by sorin_ristache » Tue May 05, 2015 6:43 pm

Hi,

It is a DITA-OT issue. You have to declare your file types (.docx, .xlsx, etc) as binary resource file types in DITA-OT by extending the dita.resource.extensions DITA-OT point, by adding a custom plugin. The .pdf file type is already is declared as a binary file type in DITA-OT, this is why the target="_blank" attribute is added. As an example you can see how the .pdf extension is decalred in the file:

DITA-OT/plugins/org.dita.base/plugin.xml
Regards,
Sorin

<oXygen/> XML Editor Support

Post Reply