Tutorial:

Introduction

With Snippets you can include text snippets in your content. You can make reusable snippets (pieces of text/content) and include them into your content via a tag, like:

{snippet my-first-snippet}

If you edit the article (or module or wherever you put the tag), you will still see the tag. But on frontend view you will see the content of the snippet instead.

You can use this to insert much used content for instance. Then, if you change the content of the snippet, it changes everywhere you have used the tag.

The Snippets tag

The Snippets editor button will help you insert Snippets tag. You don't have to use this, you can also just type the tag directly into your content. The tags look like:

{snippet snippet-id}

So to place a snippet you have given the id 'copyright', you would have to place:

{snippet copyright}

Using dynamic snippets

You can pass along 'variables' with the tag which can be placed inside the snippet. This way you can use one snippet and it will generate different output, depending on what you pass along in the tag.

Then in the Snippet itself, you can put placeholders for variables with \1, \2, etc. So in the copyright example, your Snippet could look like:

©\2 - \1 - All rights reserved

You can pass along variables in the tag like:

{snippet copyright|My Company|2012}

This would output:

©2012 - My Company - All rights reserved

And with:

{snippet copyright|Another Company|2011}

You would get:

©2011 - Another Company - All rights reserved

Settings

Editor Button Options

Enable in frontend If enabled, it will also be available in the frontend.
Button Text This text will be shown in the Editor Button.

Other Settings

Snippet tag The word to be used in the tag.

Note: If you change this, all existing tags will not work anymore.
Tag Characters The surrounding characters of the tag syntax.

Note: If you change this, all existing tags will not work anymore.

Options: {...}, [...], {{...}}, [[...]], [:...:], [%...%]
Strip Surrounding Tags Select to always remove html tags (div, p, span) surrounding the plugin tag. If switched off, the plugin will try to remove tags that break the html structure (like p inside p tags).
Disable on Components Select in which frontend components NOT to enable the use of this extension.
Remove in Disabled Components If selected, the plugin syntax will get removed from the component. If not, the original plugins syntax will remain intact.
Place HTML comments By default HTML comments are placed around the output of this extension.

These comments can help you troubleshoot when you don't get the output you expect.

If you prefer to not have these comments in your HTML output, turn this option off.
Show Update Notification If selected, an update notification will be shown in the main component view when there is a new version for this extension.
Show Copyright If selected, extra copyright info will be displayed in the admin views. Regular Labs - extensions never show copyright info or backlinks on the frontend.
FAQs:

The {snippet} tags are not being converted

The Snippets plugin is not published

Check if the Snippets plugin is published. Go to Extensions >> Plugin manager and search for the system plugin System - Regular Labs - Snippets. Then publish it.

There is markup on the {snippet} tags

If you have copy/pasted code directly into your editor, you might also have copied along hidden HTML tags. So this will also cause the {snippet} tags to break:

{<span>snippet</span> ...}

Remove the extra styling or other html tags around and in the {snippet} tags that might cause problems.

The Snippets editor button is not showing

The editor button is only available in the Pro version of Snippets.

The Snippets plugin is not published

Check if the Snippets editor button plugin is published and the access level is set Public. Go to Extensions >> Plugin manager and search for the editor button plugin Button - Regular Labs - Snippets. Then publish it.

There are no snippets

The editor button will only be available if you have snippets. So check the Snippets component to see if you have any (published) snippets there.

Free vs Pro:

Create unlimited snippets

Editor Button to place Snippets fast & easily

With Snippets you can include text snippets in your content. You can make reusable snippets (pieces of text/content) and include them into your content via a tag, like:

{snippet my-first-snippet}

If you edit the article (or module or wherever you put the tag), you will still see the tag. But on frontend view you will see the content of the snippet instead.

You can use this to insert much used content for instance. Then, if you change the content of the snippet, it changes everywhere you have used the tag.