Skip to main content
Known Participant
October 31, 2018
Question

Looking for an Easy-to-Use Code Syntax Highlighter

  • October 31, 2018
  • 1 reply
  • 1440 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 has been closed for replies.

1 reply

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/

TabbyWAuthor
Known Participant
November 1, 2018

Hi Jeff,

Thank you for this! This was the very first resource I found. And the instructions are def. much clearer than anything I found on the Syntax Highlighter sites.

However, Willam's instructions point to an older version of the Syntax Highlighter. Wondering if the newer version even works w/ RH2017, how this works w/ Responsive HTML5 output, etc. When you visit that site, it seems all over the place; not much direction, since I think the new pages are written for a different type of audience (non-programmers).

--Tabby W.