Copy link to clipboard
Copied
I'm trying to add some javascript to be called when displaying a topic. We have a snippet at the footer of each topic that calls the javascript and also has the copyright text. That call to the javascript function the snippet inserts seems to be getting included at the end of each topic's html just fine.
Now I wanted to include the javascript function that is getting called by the footer snippet only once not within each topic so I put it in the whutils.js . But unfortunately the whutils.js file seems to overwritten any time the help html project is compiled.
Is there a recommended best practice for where to include custom javascript source that won't get trounced during RoboHelp compile?
thanks for any help.
C
Welcome to our community
Typically I will create a .JS text file that contains my functions and add that to baggage.
Cheers... Rick
Helpful and Handy Links RoboHelp Wish Form/Bug Reporting Form Begin learning RoboHelp HTML 7, 8 or 9 within the day! |
Copy link to clipboard
Copied
Welcome to our community
Typically I will create a .JS text file that contains my functions and add that to baggage.
Cheers... Rick
Helpful and Handy Links RoboHelp Wish Form/Bug Reporting Form Begin learning RoboHelp HTML 7, 8 or 9 within the day! |
Copy link to clipboard
Copied
I work with developers who inject javascript into HTML reference pages in my project, so I came up against this same problem myself last year. I chose the "work around" (and I use the term loosely) of overwriting these HTML pages during the compile! (I probably shouldn't admit to this.) I didn't see any other way, since I am also generating AIR output.
Rick's solution of placing the js files as baggage files seems more prudent. The only problem I have is that these same HTML pages are originally produced from a development program called Sandcastle, and then I import them into my project. There are hundreds of them and they do not have "human-readable" names. The only way I get them to appear in my output is to edit the .hcc file in my project to include the Sandcastle TOC. I would not be able to TOC them manually if they were baggage files...much less reproduce the intricate Sandcastle TOC structure.
Any suggestions as to how I could be working smarter?
Copy link to clipboard
Copied
Hi,
You can look into scripting in RoboHelp. You can use a script to import the HTML files and recreate the TOC in RoboHelp. That might save you from manually editing RoboHelp files. See http://help.adobe.com/en_US/RoboHelp/8.0/RoboHTML/WS98613C7C-EF5B-48e9-A91A-D2AABB882687.html for more information.
Greet,
Willam