Including javascript in webhelp topic head
Post here questions and problems related to editing and publishing DITA content.
Including javascript in webhelp topic head
I have a need to include some javascript code within the <head> of each topic, and simply need to know (at this point) where to start to make sure the transformation includes my code.
Can someone please provide the file that would need to be modified?
Can someone please provide the file that would need to be modified?
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Including javascript in webhelp topic head
Post by sorin_ristache »
Hi,
In what type of transformation would you like to include the JavaScript code in the <head> element: DITA Webhelp, DocBook Webhelp? You posted the question on the XML - General XML Questions forum. Should I move this topic to the Frameworks - Document Types - DITA forum?
You can add custom JavaScript code in the <head> element of the DITA Webhelp transformation by editing the file [Oxygen-15-install-dir]\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\xsl\createMainFiles.xsl, starting with line 246, before the </head> tag. Just make sure you add a well-formed XHTML fragment that includes your custom code.
Regards,
Sorin
In what type of transformation would you like to include the JavaScript code in the <head> element: DITA Webhelp, DocBook Webhelp? You posted the question on the XML - General XML Questions forum. Should I move this topic to the Frameworks - Document Types - DITA forum?
You can add custom JavaScript code in the <head> element of the DITA Webhelp transformation by editing the file [Oxygen-15-install-dir]\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\xsl\createMainFiles.xsl, starting with line 246, before the </head> tag. Just make sure you add a well-formed XHTML fragment that includes your custom code.
Regards,
Sorin
Re: Including javascript in webhelp topic head
Thanks for the reply, Sorin. And yes... I did intend for this to be in Frameworks - Document Types - DITA
Sorry I was not descript enough - I was meaning DITA Webhelp, so you've answered the question. Thanks much!!
Sorry I was not descript enough - I was meaning DITA Webhelp, so you've answered the question. Thanks much!!
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Including javascript in webhelp topic head
Post by sorin_ristache »
OK, I just moved the topic to the Document Types - DITA forum.
Regards,
Sorin
Regards,
Sorin
Re: Including javascript in webhelp topic head
I appear to have three different instances of "</head>", none at line 246. They appear at lines 119 (template-create-toc-file), 327 (template-create tocWDiv file) and 617 (template-create index file). None of them appear to be the location I am looking for.
Is there another being used for version 15.0, build 2013062614?
Is there another being used for version 15.0, build 2013062614?
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Including javascript in webhelp topic head
Post by sorin_ristache »
Hi,
In version 15.0 the XSLT stylesheets for the Webhelp transformation were refactored. You can inject your own JavaScript code in the header of each topic by adding it in the template called "jsAndCSS" in the file [Oxygen-15-install-dir]\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\xsl\dita\desktop\common.xsl.
Regards,
Sorin
In version 15.0 the XSLT stylesheets for the Webhelp transformation were refactored. You can inject your own JavaScript code in the header of each topic by adding it in the template called "jsAndCSS" in the file [Oxygen-15-install-dir]\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\xsl\dita\desktop\common.xsl.
Regards,
Sorin
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