Snippets

Content Reuse for Images, Tables, Text and More

Snippets are blocks that can contain text, variables, images and suchlike. They are especially useful where you need to repeat the same content in many topics as any change only has to be made once.

Originally Snippets could only be included as a block of text but now they can be added inline in the same way as Variables.
Snippets are better suited to complex formatting such as tables and so on while Variables can be set up in groups when different terminology is required in different outputs. For example "Depots" rather than "Warehouses" or different prices such as $10 and £7.

Categories allow you to organise your snippets into groups making it easier to work if you have an extensive library of snippets.

Creating Categories and Snippets

  1. Click the Snippet icon in the project toolbar on the left. In a new project or one upgraded from an earlier version, you will see the Default category which will contain all the snippets from the upgraded project.

  2. To use the Categories, click the + icon and select Category to create the required categories. If you have existing snippets, you can drag those to the categories you set up. You can leave your existing snippets in the Default category if preferred.
  3. To create a new snippet, click the + icon and select Snippet to access this screen.

  4. Set the fields as required and click Create to open a blank Snippet in the Design Editor.
  5. Set up the snippet as required. If you want to apply a specific CSS to the snippet rather than allowing it to inherit the CSS of the topics it is used in, right click and select Topic Properties.
  6.  Save your changes.

In Classic versions of Adobe RoboHelp no CSS is applied to a snippet, it takes on the CSS of the topic in which it is used. In Adobe RoboHelp the default css set in Project Settings is applied. If you want Snippets to work the old way, when you create a Snippet go to Topic Properties and remove the link to the CSS.
It is important that you remove the link to your default css if you will be using the snippet inline, unless it is the same css as used in the topic.

 

 You can also select text in a topic, right click and select Snippet > Create to set up a new snippet from existing content.

Adding Snippets to a Topic

You can either drag a snippet from the Snippet Panel or press CTRL 2 and double click there.

You can insert the snippet within a paragraph or you can use it as a block snippet by inserting it in a new line.

 Snippets that contain block elements such as a table, cannot be used inline. They will get added as a block snippet.

 

 If you use the Insert icon {} on the toolbar, a dialog will show the snippets in the project. Click on a snippet to see a preview.

Snippet Properties

While you are working on the Snippet, you will see the Properties panel alongside allowing you to modify the appearance.

Snippet Folders

When you create a Snippet it is automatically saved in Assets > Snippets. View that folder in the Contents Panel and you can then create folders and organise your snippets as you wish. The Snippets Panel is a flat view of all Snippets in the project, no matter where they are saved.

Further Information

In Building the Foundation of a Superior Help System, Beth Gerber of Lightext covers a number of areas including this feature.

Donations

If you find the information and tutorials on my site save you time figuring it out for yourself and help improve what you produce, please consider making a small donation.