
What's covered?This topic describes Method 2 of implementing terminology. It is much easier to set up but catches all instances of the word defined which may or not be an issue. It also allows the customer to format the replacement word and optionally add bubble text with a fuller description. You pays your money... Please see Terminology Methods for a comparison of the two methods. Click here if you have not seen the demo. Seeing that first makes it easier to understand the method! |
Before anyone thinks I have got clever with javascript, my thanks to my colleague Tony Harris who is the person you really have to thank. In addition to his own work, he has used some scripts written by others, please do not remove their credits from the relevant files. My work was in describing the method and setting up the demo.
The basic steps are
Here's the detail.
Note that you need to disable these additional lines when producing Printed Documentation from RoboHelp. This simply requires that you open the style sheet in Notepad or your style sheet editor and add /* where indicated. Don't forget to remove the comment tag afterwards.
Pretty much everything else!
Of the four javascript files used, addKeyword.js is the only one that is edited. The raw file is shown below and as you can see, it includes instructions for its completion. The customer locates that file and edits it in a text editor such as Notepad. Do emphasise to the customer they must not use Word or other such programs.
After the screenshot, I have included some examples and explained them.
These will be a single line in your text editor, they may be wrapped in this topic depending on the size of the window.
This is telling the javascript to search for the string accounts. The parameter true is telling the search that it is case sensitive so it will not find Accounts. The replacement term is accounting and it will be formatted blue. No bubble text help has been defined.
This is telling the javascript to search for the string company and replace it with the term firm. The replacement term will be formatted red, perhaps to indicate bubble text help is available and in this instance, that has also been formatted red. The search would find both company and Company and change the string to firm for both. To keep case sensitivity there, you would create two searches, both case sensitive, and have company replaced by firm and Company replaced by Firm.
This is much the same as the previous example except that no formatting has been defined for the replacement string. The replacement will thus appear as defined for the default in addKeywords.js. The customer can change the default if they so wish.
Here nothing has been defined for the replacement string so the searched word will not change. However, its appearance will change as defined, in this case to the default colour, and bubble text would be available. This can be used where the customer is happy with the word but wants to add some information. For example, they might wish to add notes about their products so that Petrol has bubble text indicating "This product is highly inflammable".
![]()
Date |
Changes to this page |
| 07 Mar 2005 | Amended to deal with a problem when producing Printed Documentation if using this method. The additional lines in the style sheet need to be disabled while producing printed documentation. See Instruction 8 under What the Author Does. |
| 29 Jan 2005 | New topic. |