Generating Glossary term as Text pop up/Tool tip

Saturday, October 29 2011 @ 8:12 AM, By Ashish Chandra Gupta

In the last blog by Willam we were acquainted with the capabilities of the Scripting support in RoboHelp and the variety of tasks/functionalities that can be automated using scripting (link to 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 a ‘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

  • This script will update the marked glossary terms in the topics/master page and snippets with their corresponding definitions from the glossary defined.
  • There are two methods to place a marked glossary terms in any topic/snippet/master page
    • You can drag the glossary from the Glossary pod into the topic/snippet/master page and a marked glossary is created
    • You can run the “Glossary Hotspot wizard” and it will mark all the matching terms in all the topics in the project as glossary (this cannot be used to mark terms in snippet and master page)
  • Currently there are two possible settings in the script for the Glossary style
    • Glossaries can be updated to appear as Tooltip
    • Glossaries can be updated to appear as Text Popup
  • After you have run the script, the updated project can be used to generate any desired output with the preferred Glossary style.

Generating Glossary term as Text pop up/Tool tip using the script

  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. Donwload 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).
    • Either Open the script from ExtentScript Toolkit (and select RoboHelp 8 or 9 as target, according to the version installed on your machine).
    • Or you can import this script into RoboHelp, in the scripting pod to run it from there.
  5. 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  ) .
  6. 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 Adobe 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

  • Glossary definition length for Tooltip cannot be more than 512 characters and for Text Popup it cannot be more than 2025 characters
  • Please note that this script will update the content of the project so you need to create a copy of your final project every time and run the script on it to generate output with desired Glossary style as the projects topics/master pages/snippets will get updated

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.

Regards,
Ashish Chandra Gupta
RoboHelp

COMMENTS

  • By Creig Collins - 6:05 AM on October 31, 2011  

    Thanks Ashish for this informative post.
    Your blog is a source of useful information for me as I have blog related to Web development that include tips, idea, tutorial and information of different web development tools and

  • By Ashish Chandra Gupta - 6:40 AM on October 31, 2011  

    The most useful part of the script according to me, which can be useful for users is that it uses regular expression based find and replace in place of token based (implicit support in RoboHelp’s Extendscript) which is very efficient and less cumbersome to use and can be used for multiple find and replace as well and can be used to search using patterns.

  • By Holly - 8:09 PM on January 12, 2012  

    Thank you for this useful information. I have one question: can images be displayed in the glossary pop-up windows?

  • By Ritesh Pai - 8:42 AM on January 26, 2012  

    Hi,
    I am unable to download the script from the above-mentioned link. Is this script available for download from any other location? Thanks!

  • By Ashish - 8:24 AM on January 27, 2012  

    Hi Ritesh,
    The download is working fine, its url is “https://acrobat.com/app.html#d=UjeUgY53z8-FnC8FltNePA” check if this site Acrobat.com is not blocked at your end.

    Ashish

  • By Ashish - 1:17 PM on January 27, 2012  

    Hi Holly,
    RoboHelp does not supports images in glossary definition so I do not thing it is directly possible, though you can achieve this by modifying the generated code later

    Regards
    Ashish

  • By Jang Graat - 2:33 PM on June 10, 2013  

    Hello Ashish, the link to the script is incorrect. It leads to an Acrobat page, not to a page where the script might be available for download.

  • By Pankaj Morajkar - 9:09 AM on March 25, 2014  

    You can do this by clicking:

    Tools > Scripts > Output Generator with Glossary Restyling.

    I think this is available in Robohelp v10 and above.

  • Categories

  • Archives

  • Authors

  • Useful Links

  • Recent Comments

    • Joel: Thanks for fixing the links guys!
    • Maxwell Hoffmann: Ted, one aspect of the blog that may have escaped your notice; you can launch the HTML5 version in...
    • Maxwell Hoffmann: Joel, per comments made above, I discovered that the original URLs were incorrect with pointers to...
    • Maxwell Hoffmann: Paul, as I indicated in the comments below, the original blog had links that pointed to a...
    • Maxwell Hoffmann: I apologize to all concerned regarding my suggestion to “clear the cache” … it...