Select All Button for WebHelp
Are you missing a feature? Request its implementation here.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Select All Button for WebHelp
Post by sorin_ristache »
Hello,
That functionality is not available in the Webhelp output. If you tell us where you would like to add this button in the Webhelp page I could tell you what XSLT file you need to modify for adding the button and the code that executes the button in the Webhelp transformation.
Regards,
Sorin
That functionality is not available in the Webhelp output. If you tell us where you would like to add this button in the Webhelp page I could tell you what XSLT file you need to modify for adding the button and the code that executes the button in the Webhelp transformation.
Regards,
Sorin
-
- Posts: 7
- Joined: Thu Mar 13, 2014 4:23 pm
Re: Select All Button for WebHelp
Hi Sorin,
I'd like to have a copycode button for every instance of the codeblock element.
It would all my readers to use code snippets with much more ease.
A useful example from MSDN: http://blogs.msdn.com/b/jpsanders/archi ... locks.aspx
Thanks!
I'd like to have a copycode button for every instance of the codeblock element.
It would all my readers to use code snippets with much more ease.
A useful example from MSDN: http://blogs.msdn.com/b/jpsanders/archi ... locks.aspx
Thanks!
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Select All Button for WebHelp
Post by sorin_ristache »
Hi,
You will have to customize this XSLT template:
which is located in the file:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\org.dita.xhtml\xsl\xslhtml\dita2htmlImpl.xsl
You should add a Copy Code button in the Webhelp pages next to the code snippets (the content of a codeblock element in a DITA XML topic) by overriding the above XSLT template with the standard XSLT overriding mechanism by adding an xsl:template element with the same attributes (<xsl:template match="*[contains(@class, ' topic/pre ')]" mode="pre-fmt">). You should add your overriding XSLT template in this file:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\xsl\dita\desktop\fixup.xsl
This XSLT template should add the Copy Code button as XHTML code (for example a button element) and attach also the action code (JavaScript, etc) for copying the code snippet to the XHTML button.
Sorry, for now we don't have a more convenient/expedient way for this type of customization (adding a custom button, associated with a particular DITA XML element, in the content of a Webhelp page).
Regards,
Sorin
You will have to customize this XSLT template:
Code: Select all
<xsl:template match="*[contains(@class, ' topic/pre ')]" mode="pre-fmt">
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\org.dita.xhtml\xsl\xslhtml\dita2htmlImpl.xsl
You should add a Copy Code button in the Webhelp pages next to the code snippets (the content of a codeblock element in a DITA XML topic) by overriding the above XSLT template with the standard XSLT overriding mechanism by adding an xsl:template element with the same attributes (<xsl:template match="*[contains(@class, ' topic/pre ')]" mode="pre-fmt">). You should add your overriding XSLT template in this file:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\xsl\dita\desktop\fixup.xsl
This XSLT template should add the Copy Code button as XHTML code (for example a button element) and attach also the action code (JavaScript, etc) for copying the code snippet to the XHTML button.
Sorry, for now we don't have a more convenient/expedient way for this type of customization (adding a custom button, associated with a particular DITA XML element, in the content of a Webhelp page).
Regards,
Sorin
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Select All Button for WebHelp
Post by sorin_ristache »
Sorry, in version 15.2 the correct file path is:sorin wrote:You will have to customize this XSLT template:
which is located in the file:Code: Select all
<xsl:template match="*[contains(@class, ' topic/pre ')]" mode="pre-fmt">
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\org.dita.xhtml\xsl\xslhtml\dita2htmlImpl.xsl
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\xsl\xslhtml\dita2htmlImpl.xsl
The file name is the same, it's just the directory structure that is a little different.
Regards,
Sorin
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