Template syntax

This example shows how to customize the template syntax, for example, for Twig or Handlebars templating engines. Click source button on the toolbar to see what the templating code looks like.

Code


<!-- element -->
<textarea id="entry">...</textarea>

<!-- call -->
<script>
let app = Redactor('#entry', {
    templateSyntax: [
        ['{%', '%}'],
        ['{{#', '}}'],
        ['{{/', '}}']
    ]
});
</script>