• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Looking for an Easy-to-Use Code Syntax Highlighter

Community Beginner ,
Oct 31, 2018 Oct 31, 2018

Copy link to clipboard

Copied

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.

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 31, 2018 Oct 31, 2018

Copy link to clipboard

Copied

OH!!

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

Thanks!

--Tabby W.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 31, 2018 Oct 31, 2018

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 01, 2018 Nov 01, 2018

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 01, 2018 Nov 01, 2018

Copy link to clipboard

Copied

I suspect the version of Syntax Highlighter doesn't make much difference from a RH perspective (IIRC Willam says that in one spot). How well it could be integrated to HTML5 remains to be seen - it will definitely take some programmer chops to integrate it. Good luck & let us know if you get it working ;>)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 01, 2018 Nov 01, 2018

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 10, 2018 Dec 10, 2018

Copy link to clipboard

Copied

I'm also on the hunt to find a way to integrate Robohelp with a syntax highlighter. Have you been able to have any more luck with this? I'm also stumped.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 10, 2018 Dec 10, 2018

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp