templates

This option lets you specify a predefined list of templates to be inserted. Each item in the list can either be inline using a content property or a whole file using the url property see the example below for details.

Example using templates object

tinymce.init({
plugins: "template",
    templates: [
        {title: 'Some title 1', description: 'Some desc 1', content: 'My content'},
        {title: 'Some title 2', description: 'Some desc 2', url: 'development.html'}
    ]
});

Example using templates url

tinymce.init({
plugins: "template",
    templates: "/dir/templates.php"
});

Example JSON output of templates.php

[
{"title": "Some title 1", "description": "Some desc 1", "content": "My content"},
{"title": "Some title 2", "description": "Some desc 2", "url": "development.html"}
]