Templating in TinyMCE

TinyMCE in Plone 5 is adapted to allow templating engine for its content.

Right now parametrized templates are not implemented.

How to enable it

  • On Control Panel -> TinyMCE -> Toolbar -> custom plugins add:

  • On Control Panel -> TinyMCE -> Toolbar -> toolbar:

    undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | unlink plonelink ploneimage | template

How to configure which templates are available

For each template we need a file available on the browser, we assume for this example to use a diazo file at ++theme+example/templates/template.html with the content:

<div class="mceTmpl">
    <img src="++theme+example/templates/img/img1.png"/>
    <div class="row">
        <div class="col-md-6">
        <div class="col-md-6">

In order to define it:

        "title": "Template example",
        "url": "++theme++example/templates/template.html",
        "description": "Title with two columns"
        "title": "Template example2",
        "url": "++theme++example/templates/template2.html",
        "description": "Title with three columns."