Skip to main content
Known Participant
October 31, 2018
Question

Looking for an Easy-to-Use Code Syntax Highlighter

  • October 31, 2018
  • 7 replies
  • 1482 views

Hello!!

I've scanned what exist in the RH forums re: Code Syntax Highlighters, but everything is kinda OLD. Wondering if anyone knows of any successful ways that I can use Code Syntax Highlighting in my topics. I have quite a few code samples (from a few lines long to 40-50 lines long) and it would be great to have a way to do the following:

  • Display the code w/ preserved correct color coding.
  • Have proper left/right scrolling for extra long lines in the code.
  • Show/hide line numbering from the code example (sometimes, I need it to reference and sometimes, I don't)
  • Highlight certain lines of code that I am referencing in the text to call out attention.
  • Allow users to copy the code to the Clipboard to paste it into whatever API/app they are using for testing.

I explored the more recent Syntax Highlighting solution offered by Alex Gorbatchev on GitHub, but I cannot find step-by-step instructions that tell me exactly what to do, which files I need, where to store them, how to use them w/ RoboHelp.

I noticed references to the older Syntax Highlighting solution and to Peter Grainge's site in the older forums...just curious if this has been figured out to any better now, as even the instructions in the past solutions seem convoluted to me also.

In other words, I am completely LOST. Is this something that only Programmers understand how to do? Sorry to bring up an old subject, but it has not been answered to my satisfaction/understanding. Plus, maybe there is something NEW out there...I've been looking, but without much luck.

Thank you in advance!!

--Tabby W.

This topic is closed to new replies. Start a new post to keep the conversation going.

7 replies

TabbyWAuthor
Known Participant
October 31, 2018

OH!!

I should also mention that I am using RH2017/Windows7/Responsive HTML5 Output.

Thanks!

--Tabby W.

Jeff_Coatsworth
Community Expert
Community Expert
October 31, 2018

Looks like Willam talks about using that solution on his blog - https://www.helpessentials.com/2014/07/05/adobe-robohelp-using-javascript-syntax-highligher/

Community Expert
December 11, 2018

Hi Jeff,

I had a little time to spend on this today.

An update - the v3.0.83 Syntax Highlighter files are no longer available for download (couldn't go backwards even if I wanted to). So users MUST go to the github site where the v4.0.1 Syntax Highlighter files are.

Once you are there, Good Luck making sense of anything! The files are all different - none of Willam's instructions can help you now and what documentation is available on this new site is not useful at all.

I will continue to look around for some other solution. Too bad - would have been a great solution if easier to implement.

--Tabby W.


I think* that Willam's instructions will probably* work once you get the files you need.

As far as I can tell, you can't just download the js and css any more, but instead need to get the source files from github, then compile the source into the required js and css files using the command line tool npm.

You might be better to get developer help for the syntax highlighter instructions for Building. Then see if you can follow Willam's instructions once you have the js and css files.

* Disclaimers:

Just basing this on poking around the help text on the github site.

Willam's instructions might not work in RH2019 (New) because the entire product has been re-written. And/or depends on your output.