Generating Glossary Term as a Text Pop-up / Tool Tip

In the last blog by Willam van Weelden we were acquainted with the capabilities of the Scripting support in RoboHelp and the variety of tasks/functionalities that can be automated using scripting (see also Willam’s Blog). In continuation with the exploration of the support of scripting in RoboHelp, we are providing a script which elaborates the power of scripting. This Script can be used to update marked glossary terms in RoboHelp project content to show up “Tool Tip” or “Text Popup” in the output.

The scripting feature (ExtendScript support) was introduced in RoboHelp 8 and thus the script should work on projects of RoboHelp version 8 and above. It can be run on any open project in RoboHelp that has marked Glossary terms. This script will update the marked terms with their corresponding definitions (according to the style defined by GlossaryStyle variable in the script and as per the glossary defined in the variable GlossaryName in the script).

More than to showcase the power of ExtendScript this has been the ask of many users from a long time, as by default the Glossary appears as an “Expanding text” in the output and when we click the glossary term in the output, it expands inline to show the definition thus making the content to re-flow on the page, which in certain cases may not be desirable hence the users wanted to be able to output Glossary as Tool tip or Text popup to avoid this re-flow.

About the script

Generating Glossary Term as Text pop up/Tool Tip Using this ExtendScript

  1. Launch RoboHelp
  2. After you are completely done with all the content creation and styling in RoboHelp and ready to generate the output, create a copy of the RoboHelp project that has a glossary you want to update.
  3. If glossary terms have not been marked then mark glossary terms in the project, you can run the Glossary Hotspot wizard to mark the glossary terms in the topic (glossary terms can be also dragged into the topics directly as well) and drag drop glossary terms into master pages and/or snippets (if you want some marked glossary terms in them too).
  4. Download the script from the link UpdateMarkedGlossaryTerms. Update the GlossaryName and GlossaryStyle variables in the script according to your need (by default the default Glossary is used and the default Glossary style is Tool Tip – look into the script for more details).
  1. Run the script (with ExtentScript Toolkit you can run it by pressing F5 and in the scripting pod you can run by selecting the script and Right click -> Run).
  2. On generating the output from this project, you will see the glossary as ToolTip or Text pop up as per the GlossaryStyle set in the script.

For FrameMaker-RoboHelp integration users

With Technical Communication Suite 2 and above the same script can be used to update the glossary terms from FrameMaker to appear as Text Pop-up/Tool Tip in the output.

  1. After import/update FM link and completing style changes in RoboHelp, when your project is ready to generate output, you should create a copy of your project.
  2. In this Project copy, set the Glossary generated from FrameMaker as default and run the Glossary Hotspot wizard to mark the glossary terms in the topics generated from FrameMaker.
  3. Rest steps 4 to 6 will be same as mentioned above.

Limitations of the script

Hope this will be useful for many users who coveted for glossary style in the output as Tool tip or Text popup from a long time and for the scripting geeks this may help them build on other variations, this might also help other users to get an idea regarding how to customize XHTML code and get the desired variations in their output.

Ashish Chandra Gupta