Copy link to clipboard
Copied
I have a feeling this isn't actually possible without a whole lot of manual work, but I want to preserve syntax highlighting in code examples in my online help. Like this:
All I can do is black text. |:^(
I am using Robohelp 7, generating to WebHelp.
Thanks for any help anyone can pass on!
Copy link to clipboard
Copied
Hi cmac24 and welcome to the RH community.
I managed to achieve this using RHX5 and producing a CHM file. I haven't tried it in a later version or using WebHelp but I see no reason why it wouldn't work. Peter Grainge's site has documented how I achieved this. Go to his "Snippets" section and look at number 87.
Read the RoboColum(n).
Copy link to clipboard
Copied
Hi Colum,
Thanks so much for your reply. I'm not sure I was clear in my question though. I don't want to be able to run the code from the doc, I just want a way to paste multi-coloured text into Robohelp and not have it display as multi-coloured, not black. The first step in your process, "format the text (code snippet ) as required" is precisely what I want to avoid doing.
Any advice?
Thanks!
Copy link to clipboard
Copied
I don't believe that can be done as each application has its own colour coding format rules. For example if you copy the HTML from a RH topic complete with its colour coding into Notepad, you loose the colour coding. If you make a change to the HTML in Notepad and then copy and paste it back into RH, any additional tags are coloured appropriately.
The RH WYSIWYG is just applying its colouring rules as it sees fit and nothing you can do will stop it doing so. If the snippet isn't what you want, could you embed the code sample in an file produced by the coding application and add this to your topic. Just a thought!
Read the RoboColum(n).
Copy link to clipboard
Copied
Hi all
I'm not sure if it's a feasible solution for you, but what about displaying the code (complete with color coding - oops, that's colour coding for you English chaps) in whatever application you use. Then grab a screen capture of the relevant area and insert as an image in RoboHelp.
My thought here is that you could maintain the code in the other app in case you need to change it at some point. Then if it does change, just snag another image.
Cheers... Rick
Helpful and Handy Links RoboHelp Wish Form/Bug Reporting Form Begin learning RoboHelp HTML 7 or 8 within the day - $24.95! |
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi,
Almost a year has passed, but I stubled upon this and you might still like this answer...
There is a syntax highlighter javascript you can use in WebHelp: http://alexgorbatchev.com/SyntaxHighlighter/ It's javascript and css based and easy to implement. See the installation instructions on the before mentioned site. (Use the <pre> tags, the <script> tags won't work with RH.) You can simply highlight XML, JS, PHP, Perl and other languages.
Greet,
Willam