Snippets

In Redactor, you can insert pre-made pieces of content into your content. You can do this with the Snippets plugin. See its page for a detailed description of how it works.

Click the 'Add' (+) button on the toolbar to open addbar and then click on 'Snippets'.

Code

<!DOCTYPE html>
<html>
    <head>
        <title>Redactor</title>
        <meta charset="utf-8">

        <!-- css -->
        <link rel="stylesheet" href="/your-folder/redactor.css" />
    </head>
    <body>
        <!-- element -->
        <textarea id="entry">...</textarea>

        <!-- js -->
        <script src="/your-folder/redactor.js"></script>
        <script src="/your-folder/plugins/snippets/snippets.js"></script>

        <!-- call -->
        <script>
        Redactor('#entry', {
            plugins: ['snippets'],
            snippets: '/your-folder/snippets.json'
        });
        </script>
    </body>
</html>