User Guide Cancel

Single-source with snippets

  1. RoboHelp User Guide
  2. Introduction
    1. Get to know RoboHelp workspace
    2. What's new in RoboHelp 2022 release
      1. What's new in Update 5
      2. What's new in Update 4
      3. What's new in Update 3
      4. What's new in Update 2
      5. What's new in Update 1
    3. Fixed Issues in RoboHelp
    4. RoboHelp System Requirements
    5. Download RoboHelp on Windows and macOS
    6. Download and install Adobe app
    7. RoboHelp FAQs
    8. What's new in RoboHelp 2020 release
      1. What's new in Update 8
      2. What's new in Update 7
      3. What's new in Update 6
      4. What's new in Update 5
      5. What's new in Update 4
      6. What's new in Update 3
      7. What's new in Update 2
      8. What's new in Update 1
  3. Projects
    1. Plan your RoboHelp project
    2. Create a project
    3. Manage projects
    4. Work with topics and folders
    5. Generate reports
    6. Work with context-sensitive help
    7. Manage References
    8. Set preferences in RoboHelp
  4. Collaborate with authors
    1. Collaborate using Git
    2. Collaborate using SharePoint Online
    3. Collaborate using Azure DevOps (Team Foundation Server)
  5. PDF Layout
    1. PDF templates
    2. Design a page layout
    3. Publish PDF output
    4. Work with the common content styles
    5. Components of a PDF template
    6. Support for language variables
    7. Customize PDFs
  6. Editing and formatting
    1. Format your content
    2. Create and manage cross-references
    3. Create and manage links
    4. Single-source with snippets
    5. Work with images and multimedia
    6. Create and use variables for easy updates
    7. Work with Variable Sets
    8. Use Find and Replace
    9. Auto save your content
    10. Side-by-side editing in Split View
    11. Use the Spell Check feature
    12. Create and Edit Bookmarks
    13. Insert and update fields
    14. Switch between multiple views
    15. Autonumbering in CSS
  7. Import and linking
    1. Import Markdown files into a project
    2. Import Word documents into a project
    3. Import FrameMaker documents into a project
  8. TOCs, indexes, glossaries, and citations
    1. Create and manage a Table of Contents
    2. Create and manage an index
    3. Create and manage a glossary
    4. Create and manage citations
    5. Create and manage browse sequences
    6. Work with See Also and Related Topics
  9. Conditional content
    1. What is conditional content
    2. Create and apply condition tags
    3. Configure output presets for conditional content
    4. Optimize and manage conditional content
  10. Microcontent
    1. Microcontent
  11. Review and Collaboration
    1. Review and Collaboration
  12. Translation
    1. Translating content to multiple languages
    2. Configure a translation framework for a service provider
  13. Generating output
    1. Generate output
    2. Generate Frameless output
    3. Generate Knowledge Base output
    4. Generate PDF output
    5. Generate Responsive HTML5 output
    6. Generate Word Document output
    7. Generate Content Only output
    8. Generate eBook output
    9. Generate Microsoft HTML Help output
    10. Generate Mobile App output
  14. Publish output
    1. Publish to a RoboHelp Server
    2. Publish to an FTP server, a Secure FTP server, or a File System
    3. Publish to SharePoint Online
    4. Publish to Zendesk Help Center
    5. Publish to Salesforce Knowledge Base
    6. Publish to ServiceNow Knowledge Base
    7. Publish to Zoho Knowledge Base
    8. Publish to Adobe Experience Manager
    9. Publish to Atlassian Confluence Knowledge Base
  15. Appendix
    1. Adobe RoboHelp Scripting Reference
    2. RoboHelp keyboard shortcuts

Learn about how to use and work with snippets in RoboHelp.

A snippet can be a para­graph of text, a piece of code, an object such as an image, or an entire topic. You can single-source a snippet and reuse it across multiple topics in a project. A snippet can also contain variables and conditional text tags. When you change the contents of a snippet, it's updated across all the topics that include it.

Use inline snippets within your text to create emphasis on essential keywords. You can select text within the paragraph and create a snippet of the selected portion or create it directly in the snippet editor. On usage, it can be inserted within any paragraph or text as an inline snippet.

You can organize your snippets in different categories for better view and ease of use while authoring. It's mandatory to add the snippet to a category. Snippets are added to the default category if a category isn't specified.

Create a snippet category

Open a project in RoboHelp and follow these steps to create a snippet category:

  1. In the Author toolbar, select Snippets. The Snippets panel opens.

  2. In the Snippets panel, select , and then select Category.

  3. In the dialog box, add Name for the category.
    A new category is added in the snippet panel.

Tip:

You can also drag and drop snippets across categories to organize them more easily.

Additional options for Snippet Category

Hover over the snippet category name, and select the   menu for additional options.

snippet caegory menu options

Rename

Change the name of the snippet category.

Note:

You can't rename or delete the default category. Only the import function applies to the default category.

Delete

Delete the snippet category, which is no longer required. Deleting a category will move the snippets under this category to the default category.

Import

You can import snippets directly into a category by selecting the import option. You can import more than one snippet at a go. The snippets will directly get imported into the category. Learn more about importing the snippet from Import a snippet.

Create a snippet

Open a project in RoboHelp and follow these steps to create a snippet:

  1. In the Author toolbar, select Snippets. The Snippets panel opens.

  2. In the Snippets panel, select , and then select Snippet.

    Alternatively, you can right-click the snippet panel and select New to add a new snippet.

  3. In the Snippet dialog box, specify Name, Category, and Description for the snippet. You can also create a category from this dialog box by directly writing a category name in the category field.

    Note:

    You can specify the new snippets in the default category if no other category is created. Learn more about creating a new snippet category from Create a Snippet Category.

    add new snippet in category

  4. Click Create. The snippet is created and can be accessed from the Snippets panel.

Additional options for Snippet

Hover over the snippet name, and select the  menu for the following additional options.

Edit
Edit the snippet content.

Preview
Preview the snippet in a preview box.

Rename
Change the name of the snippet.

Delete
Delete the snippet which is no longer required.

Export
Export the snippet to your system. Select the folder in which you want to export the snippets.

Reveal in Finder/Show in Explorer?
Check how snippets files view in your system by opening them in file explorer.

Properties
Check the properties of the snippet and make changes as required. These properties include file name, language, tags, styles, and many more options. Learn more about these properties from Topic Properties.

Import a snippet

You can import the snippets by using. hts files.

Tip:

The .hts file stands for HyperTuner Skin. They are primary files that are generally considered settings files.

To import a snippet file, follow these steps:

  1. Right-click in the snippets panel, and select Import.
    It opens the file explorer.

    By default, snippets are imported to the Default category. If you select a category and then import, snippets are imported to that category.

  2. Select the .hts file from the file explorer.
    The selected snippet file is now added to the snippet panel.

Create an inline snippet

Open a project in RoboHelp and follow these steps to create an inline snippet:

  1. In the Author toolbar, select Contents and open a desired topic from the Contents panel.

  2. Within a paragraph, select the text for which you want to create an inline snippet. You can choose to apply inline formatting like Bold, Underline, and so on. 

  3. Right-click the highlighted text and choose Create snippet.

  4. In the New Snippet dialog box, specify the name and description of the snippet in Name, Category, and Description, respectively.

  5. Click Create. The snippet is created and can be accessed from the Snippets panel.

    You can now use this inline snippet with other text as part of the paragraph.

Note:

You can use snippets for any formatted content whereas variables are for any plain text as they can be used inside attributes.

Insert a snippet

To insert or use a snippet in an open topic:

  1. To open a topic:

    In the Author toolbar, select Contents and open a topic of your choice from the Contents panel.

  2. In the Author toolbar, select Snippets. In the Snippets panel, choose a snippet.

  3. Now drag-and-drop the selected snippet at the preferred location in the open topic.

    Alternatively, select Snippets from the standard toolbar or press Ctrl+2. In the Snippet dialog box, you can filter snippets by typing the first few alphabets. Press the upward and downward arrow keys to navigate through the list of snippets. Select the snippet and click Insert.

    Preview of snippet before adding in topic

  4. Click the Save All icon  at the left side of the standard toolbar.

Delete a snippet

To delete a snippet from a project, follow these steps:

  1. In the Author toolbar, select Snippets. The Snippets panel opens.

  2. Select the snippet that you want to delete and select options icon  next to the snippet.

  3. In the options list, select Delete.

  4. In the confirm dialog box, click Yes.

Delete a snippet category

To delete a snippet category from a project, follow these steps:

  1. In the Author toolbar, select Snippets. The Snippets panel opens.

  2. Select the snippet category that you want to delete and select options icon  next to the snippet category.

  3. In the options list, select Delete.

  4. Select Yes to confirm the deletion of the snippet category from the project.

    Note:

    The snippets present in the deleted category are moved to the default category. 

Generate Snippets report

You can generate a Snippets report to view the details of snippets in your project. You can also customize, download, or print your report.

  1. In the Author toolbar, select Reports. The Reports panel opens.

  2. In the Reports panel that appears, select Snippets.

  3. You can customize a report using the Filters panel on the right side of the screen. To know more, see Customize a report.

  4. Click the Download icon  in the standard toolbar to instantly download the report.

  5. Click the Print icon  in the standard toolbar to print your report.

Search and preview a snippet

In the Snippets panel, you can search and preview a snippet. It searches in the snippet name only. From the results, right-click an item, and click Preview.

You can preview the snippet in rich text format.

 Adobe

Get help faster and easier

New user?