Skip to main content
davidk99046111
Inspiring
March 29, 2023
Question

RH2022 - Disable Search Term Highlights

  • March 29, 2023
  • 2 replies
  • 242 views

Not sure if this is just a setting I am missing.  Is it possible to completely disable the search term highlight feature? 

 

I have several topics that provide blocks of code for users to copy/paste.  When accessing these pages from a search result, the code block format is modified by the highlight code which messes up the how the content is copied. This mainly affects blocks of code in a preformatted text <pre> tag that involves separate lines.  When copying from the page the highlight feature, it ignores the format and pastes it all as a single line

Example without the Highlight:

 

 

 

<pre>Hello there
This is an example
of some code
</pre>

 

 

 

And this is the format when copying out of the output page without the search result highlight:

 

 

 

Hello there
This is example
of some code

 

 

 

But if you were copying this output from a search result, with the highlight used to highlight the terms in the code example, it comes out as a single line when copying/pasting.  

 

 

 

 

Hello there This is example of some code

 

 

 


I have found a work around by placing the code examples into paragraphs or divs and using line breaks to separate the lines.  While this works for small code examples, it would be a pain to have to manually format large code blocks.  

 

I tried using the UI toggle off button on the topic but it just removes the highlight, the format is still bad.  If you reload the page without the search involved, the text and code renders and copies properly.  

    This topic has been closed for replies.

    2 replies

    Peter Grainge
    Community Expert
    Community Expert
    March 30, 2023

    Creating a text area seems to work.

     

    <p><textarea cols="50" id="w3review" name="w3review" rows="4">At w3schools.com you will learn how to make a website. They offer free tutorials in all web development technologies.
    </textarea></p>

     

    I searched on w3schools. Note how in an ordinary paragraph the term is highlighted but is not highlighted in the text area.

     

     

    Even without the line that is highlighted the topic is found and can be opened. However, the user then doesn't see where the term is.

     

    I guess you could repeat the code in and out of the text area with a note to copy from the text area. Not ideal but it's all I can offer.

     

    In Classic versions of RoboHelp I had a method that put a button above the text area and clicking it would copy the content to the clipboard. It doesn't work in the new UI versions but maybe your developers can help with that. If they can, it would be appreciated if you would share it here.

    ________________________________________________________

    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

     

    Use menu (bottom right) to mark as Best Answer or to Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    Community Expert
    March 30, 2023

    I checked in RH2019 New UI and the javascript that controls the highlighting specifically deletes \n, \r and \t, which are newlines, carriage returns and tabs when re-writing the code to add the highlight. From what you describe, it sounds like the same thing or at least something very similar is being done in RH2022. I think the only thing you can do is submit a bug report. You can request features and report issues here: https://tracker.adobe.com/

    Post the item number in the discussion so people can easily vote if they want the same functionality.