Email templates

This example shows how to load email layouts with the Templates plugin when the Email product plugin is enabled.

Code

<div id="entry-email-templates"></div>
<script src="/assets/redactor/plugins/email/email.js"></script>
<script src="/assets/redactor/plugins/templates/templates.js"></script>
const app = Redactor('#entry-email-templates', {
    plugins: ['email', 'templates'],
    templates: {
        templates: '/tests/redactor5/email-templates.json'
    }
});

Each entry in the JSON file uses name and html. Email templates may also include hidden email-options and email-style blocks that the Email plugin reads on insert.