Remove Highlighting from Search Results

pault
Posts: 56

Remove Highlighting from Search Results

Wed Aug 24, 2016 8:57 pm

When a user searches on a website generated from WebHelp Responsive, the search terms are highlighted in the result documents. This highlighten can be distracting. Is there a way to turn off the highlighting other than removing ?hl=term from the URL?

Thanks,

Paul
alin
Site Admin
Posts: 112

Re: Remove Highlighting from Search Results

Thu Aug 25, 2016 11:34 am

Hello,

Unfortunately, there is no straight forward option that can be used to turn off the highlighting mechanism.

However, you can achieve this by editing the default template used to generate the WebHelp Responsive output:
  1. Open the JavaScript file that contains the code responsible for highlighting the search terms:
    [Oxygen-18.0-Installation-Directory]/frameworks/dita/DITA-OT2.x/plugins/com.oxygenxml.webhelp/templates/dita/bootstrap/resources/js/wt_default.js
  2. Change the value for the highlighted variable at line 2 to true.

    Code: Select all

    var highlighted = true;

The fix above is valid only if you are using DITA-OT 2.x as the current DITA Open Toolkit distribution. If you are using DITA-OT 1.8 you should edit the next file:
[Oxygen-18.0-Installation-Directory]/frameworks/dita/DITA-OT/plugins/com.oxygenxml.webhelp/templates/dita/bootstrap/resources/js/wt_default.js

You can check which version of DITA Open Toolkit you are using in the DITA preferences page (Main Menu -> Options -> Preferences...).
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 1 guest