Expanding text is a feature that lets users click a hotspot to expand and collapse content that appears after it in the same paragraph or other block element. Let's say you have a bulleted list in a topic. After each bullet is a feature of the software program that you are explaining. You have given a detailed description of each feature, and now the topic seems to be getting quite lengthy. So you decide to condense each bulleted item so that users initially see only the name of the feature, which appears as a link (also called an "expanding text hotspot"). When users click that hotspot, the hidden content (i.e., the rest of the paragraph) "expands" and is displayed after the hotspot. When users click the hotspot again, the content becomes hidden once more.
- Open the content file (e.g., topic, snippet).
- In the XML Editor type and format the content that will become the expanding text.
Highlight the portion of the paragraph that you want to be used as the hotspot. If you do not select any text in the paragraph, it will all become the hotspot.
Note: Although this feature is called "expanding text," the content does not have to be strictly text only. For example, you can use a small image for the hotspot.
Select the Insert ribbon. In the Text section, select Expanding Text.
The selection is now surrounded by brackets in the XML Editor (if markers are turned on). The hotspot appears with an icon next to it. A second set of empty brackets follows the hotspot.
Note: The font used in the expanding text depends on the settings specified for the MadCap|expandingHead and MadCap|expandingBody styles in your stylesheet.
In the empty bracket, type the body text for the expanding effect.
Note: If you do not have markers enabled, you will not see the empty bracket. To enable markers, click the down arrow next to in the local toolbar of the XML Editor, then select Show Markers.
- (Optional) If you want to adjust the text that serves as the hotspot, you can highlight the text in the current hotspot area. Then in the Insert ribbon, click the down arrow in the Expanding Text field and select Expanding Hotspot. This pushes any text after your selecting into the second set of brackets.
- Click to save your work.