Hi,
There are 2 possible solutions to add the
oncontextmenu attribute on the <body> element.
1. Adding the attribute using
XSLT extension point:
* Create a
custom publishing template
* In the custom publishing template folder create a folder named
xsl
* In the
xsl folder create a xsl file, for example
disable-context-menu.xsl.
* Add in the xsl file the following template:
Code: Select all
<xsl:template match="*:body[contains(@class, 'wh_topic_page')]" mode="copy_template">
<xsl:copy copy-namespaces="no">
<xsl:attribute name="oncontextmenu">return false;</xsl:attribute>
<!-- Apply the default processing -->
<xsl:next-match/>
</xsl:copy>
</xsl:template>
* Open the template descriptor file associated with your publishing template (the .opt file) and set the XSLT stylesheet created in the previous step with the com.oxygenxml.webhelp.xsl.createMainPage XSLT extension point.
Code: Select all
<publishing-template>
...
<webhelp>
...
<xslt>
<extension
file="xslt/disable-context-menu.xsl"
id="com.oxygenxml.webhelp.xsl.dita2webhelp"/>
</xslt>
...
</webhelp>
</publishing-template>
* Run the WebHelp Responsive transformation using the custom publishing template.
Note: An example for this publishing template can be found here using the following link
https://github.com/oxygenxml/oxygen-pub ... ntext-menu
2. Adding the attribute by modifying the
HTML Page Layout Files:
* Create a
custom publishing template and select the Include HTML Page Layout Files.
* In your custom publishing template edit the
page-templates/wt_topic.html file and add the attribute
oncontextmenu on the
<body> element.
Code: Select all
<body class="wh_topic_page" oncontextmenu="return flase;">
* Run the WebHelp Responsive transformation using the custom publishing template.
Best regards,
Beniamin Savu
Oxygen WebHelp Team
http://www.oxygenxml.com