Plans supporting content reuse
Professional | Business | Enterprise |
---|---|---|
Snippets is a predefined set of content blocks the content manager or author uses as reusable content. The Snippet's content can vary from simple text or phrases to lengthy paragraphs, tables, images, and more. In Document360, the snippets are stored in a library, and you can easily insert them into articles during editing with just a click of a button.
NOTE
The Snippet will appear as regular content to the reader on the Knowledge base site. The reader will not know that the content was rendered through Snippet.
Creating a snippet
To create a snippet:
Navigate to Documentation () > Content tools > Content reuse > Snippets in the knowledge base portal.
The Snippets page appears. If you have added any snippets earlier, you can see them listed here.
Click Create snippets at the top to select language-specific snippets (Global, English, French, etc.) added to your project.
Enter the Name for your snippet.
NOTE
The snippet name can include letters, numbers, hyphens, and underscores, with a maximum length of 30 characters.
The Merge code value will be the snippet name that appears with the snippet tag in your editor.
For example, if your snippet name is Disclaimer, then your Merge code value would be {{snippet.Disclaimer}}.
In the Language selection dropdown, the default selection is Global (Available across all languages). However, if needed, you can choose a desired available language to create a language-specific snippet.
In the Content field, enter the snippet's content.
By default, the snippet editor will be WYSIWYG (HTML). However, you can switch to the Markdown editor if required.
NOTE
Switching to Markdown:
Click Switch to Markdown.
Click Proceed in the Change confirmation prompt.
You will lose the WYSIWYG content when you switch to Markdown.
Once done, click Create snippet.
Formatting options
WYSIWYG
The below formatting options are available for snippet content in WYSIWYG:
Basic text formatting options such as Bold, Italic, Strikethrough, and Underline are available.
Additional formatting options include Font size, Font Family, Text color, Background color, Subscript, Superscript, and Clear Formatting.
You can create Ordered and Unordered Lists for listing items.
Insert Image allows you to insert an image from a URL, local storage, or Drive.
Insert Link lets you add a hyperlink from a provided URL or link to a knowledge base article.
You can use Insert callouts such as Info, Warning, Error, and Success.
Insert latex lets you add expressions and equations:
Click the Insert latex option, and an Insert latex expression panel will appear.
Type your desired Latex syntax and click Insert.
Read this article for basic Latex commands used in Latex syntax.
Insert table allows you to create a table by selecting the required number of rows and columns.
Insert codeblock lets you add codeblocks.
Click Insert codeblock and select the language of the desired code from the dropdown.
Add code in the Insert your code field and click Insert.
You can preview the Snippet in Code view (HTML). Click Code view to view the preview. If you want to switch back to the editor view, click Code view again.
Markdown
Markdown is handy when significant text and minimal media are involved in the Snippet. You can use Markdown syntax manually while writing or formatting text using the Markdown toolbar.
For example, you can make a text appear bold by writing the respective syntax or using the Bold () icon in the Markdown toolbar.
Basic text formatting options such as Bold, Italic, Strikethrough are available.
Block quote lets you add block quotes.
Line lets you insert a horizontal line.
Ordered List and Unordered List are available for listing items.
Insert Table allows you to create a table by selecting the required number of rows and columns.
Insert Image allows you to insert an image from a URL, local storage, or Drive.
Insert Codeblock lets you add code blocks:
Click Insert Codeblock and type the desired code inside the code block.
Example:
`code`
.
You can use Insert callouts such as Info, Warning, Error, and Success.
Insert latex lets you add expressions and equations.
Click the Insert latex option, and a sample latex syntax (
) will appear. Type your desired syntax.
The syntax must start and end with
$
.
NOTE
When adding latex, do not include a space between
$
and syntax. For more information, read this article for basic latex commands.
Insert Link allows you to add a hyperlink from a provided URL or link to a knowledge base article.
Glossary lets you add glossary terms to your Snippet.
Inserting snippet in the article
There are two methods by which you could add a snippet to your article.
You can insert snippet in the articles in two methods:
Method 1: Using the syntax (Markdown editor)
Method 2: From the toolbar (Markdown, WYSIWYG editor, and Advanced WYSIWYG editor)
In the Markdown editor, type a snippet.MergeCodeValue between closed double curly brackets.
Example: {{snippet.Disclaimer}}
You must know the exact merge code value to add the desired snippet. The snippet will not work even if a single letter changes.
NOTE
Typing in snippet.Merge_Code_Value will only work in the Markdown editor. If you are using Advanced WYSIWYG editor, you can insert snippet using the toolbar.
To insert a snippet from the editor toolbar:
Click on Content reuse () icon for Markdown and WYSIWYG editor.
In the Advanced WYSIWYG editor, use the slash command/snippets
and hit Enter.Select the snippet or use the Search snippets bar to narrow down the snippet name.
In the Advanced WYSIWYG editor, the Snippet pane for snippet selection appears on the right. Hover over a snippet name to preview its content.
Select the intended snippet to insert.
NOTE
If the Insert as local copy toggle is on, the snippet content added to the article will remain unchanged. The snippet in the article will not be affected if the selected snippet's content is modified or removed in the future.
Snippets page
You can view, edit, or delete a snippet on the Snippets page.
Navigate to Documentation () > Content tools > Content reuse > Snippets in the knowledge base portal.
The Snippets page appears where you can find the list of snippets you have already added.
Languages: To filter the snippet in Global or a specific language.
Search snippets: Search the snippet list based on the name.
Used in: If a snippet is not added to any article/category page, the status would be
-
. If a snippet is added to any article/category page, you can click the View button to see the list of articles/category pages containing the snippet.Language: The desired language of each snippet.
Last modified: The last time the snippet content was updated.
Preview: Click on the snippet name, and you can view the snippet's content.
Progress: Click the globe icon to view the snippet’s progress in multiple languages.
Edit () icon: To edit the snippet content.
Delete () icon: To remove the snippet.
View article/category page dependency
In the Snippets page, you can find the Used in column.
In the Used in column, click on the View button.
The View references panel will appear, where you can view the list of articles/category pages to which the snippet has been added.
Click on the article to expand the section.
You can find the following information:
The article version.
The project workspace and language.
The team account name and profile picture who has added the snippet.
The article states (Published, Draft, New Article).
The time/date information when the snippet was inserted in the article/category page.
Editing an existing snippet
Navigate to Documentation () > Content tools > Content reuse > Snippets in the knowledge base portal.
The Snippets page appears. You can find the list of snippets you have already added.
Hover over the desired snippet and click the Edit () icon.
After you complete the content edit, click on the Update button.
NOTE
When you update a snippet in the library, the changes are automatically reflected in all articles and category pages that use it. This includes published articles, which will be updated without needing to republish them.
Deleting a snippet
Navigate to Documentation () > Content tools > Content reuse > Snippets in the knowledge base portal.
The Snippets page will appear. You can find the list of snippets you have already added.
Hover over the desired snippet and click the Delete () icon.
Click Yes in the confirmation prompt.
To bulk delete multiple snippets
Select multiple intended snippets from the Snippets page and click the Delete option at the top of the list.
Translating snippets
You can create and manage snippets in multiple languages. This ensures that when your articles are translated, the snippets match the language of the article, providing a consistent and localized user experience.
NOTE
Global snippets cannot be translated.
Translating new snippets
Navigate to the Documentation () > Content tools > Content reuse > Snippets in the knowledge base portal.
Click Create snippet.
In the Language dropdown, select the intended language.
Enter the snippet name and the content for the snippet in English (or your default language).
Click Switch to markdown to change the content editor from WYSIWYG to the Markdown editor.
To translate the content into other languages, click the Translate to other languages dropdown.
Select the desired language(s) from the dropdown menu and click Translate.
NOTE
The default language will be marked as Main.
Translated languages will be indicated with a green tick to show that the translation is complete. If needed, you can navigate to untranslated languages and complete their translation.
Once the translations are complete, click Create snippet to save the snippet along with its translations.
For example, if you create a snippet for a welcome message in English, you can use the translation feature to add the same message in French, Spanish, Dutch, etc.
Translating existing snippets
Click the desired existing snippet you wish to translate.
Navigate to Translate to other languages and select the desired language that the snippet needs to be translated.
Click Translate.
If needed, you can navigate to other languages and again translate into those languages.
To translate the content again, click Translate again. This will overwrite the existing translation with a new one.
If you need to remove the translated snippet for a specific language, click Remove language.
You can retranslate the content at any time if needed.
Troubleshooting
Snippets are not appearing in the editor menu
This issue typically occurs when a snippet is created in one language but used in an article written in a different language. In Document360, snippets are language-specific unless created under the Global language setting.
Steps to resolve:
Ensure the snippet is created in the same language as the article you're working on.
If the snippet was created in a different language, use the Translate to other languages option available in the Content reuse section.
Once translated, switch to the desired language in the article editor. The snippet should now appear when you try to insert it into the article.
NOTE
Snippets created under a specific language will only appear in articles written in that same language.
If the snippets are still not appearing after following the above steps, please contact support@document360.com with the following details:
A screenshot of the snippet in the Content reuse section.
A screenshot showing the snippet not appearing in the article editor.
FAQs
How many snippets can be created in one project?
You can create up to 200 snippets in a single project. If you need more, additional snippets can be purchased as an add-on.
Can I change the name of a snippet after it has been created?
While you can edit the contents of a snippet, its name cannot be changed after creation.
Why is a snippet inserted in a new line?
Snippets are designed as new blocks of content, allowing for multiple lines to be added within them. As such, they will always start from a new line to maintain structure and clarity.