Templates

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

Click the 'Templates' button on the toolbar to open the templates modal.

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/templates/templates.js"></script>

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