Snippets are very similar to variables: the snippet is placed within topics and will be replaced by its current value at generation time. They can be useful in multiple situations:

  • A piece of content needs to be repeated multiple times within the project;
  • A work in progress can first be written as a snippet included in the topic, and later copy / pasted as the topic content;

Overview of the user interface

1. Library item name

Choose a unique name for that library item.

2. Commands

Commands available for the image map library item:

  • Update snippet: show the Snippet editor to edit the current content of the snippet
  • Clear snippet content: clear the content of the snippet

3. Preview

Current content of the snippet

Convert the topic's content to a snippet

It is possible to quickly convert the selected topic's content to a snippet, to be able to reuse it elsewhere:

  • Select the desired content in the topic editor
  • Right click on it
  • Click "Convert to snippet..."

HelpNDoc will ask if the selected content should be replaced by the newly created snippet. Choose either:

  • Yes: the selected content is replaced by the newly created snippet
  • No: the selected content remains as-is and a new snippet is created in the library
  • Cancel: cancel the operation without creating a new snippet