Apparently, all templates must be defined in one plugin file "templates" in "plugins / templates / templates / default.js" in response to each other.
CKEDITOR.addTemplates ('header',
{
imagesPath: CKEDITOR.getUrl (CKEDITOR.plugins.getPath ('templates') + 'templates / images /')
templates: [
{
title: 'HEADER'
Image: 'template1.gif'
description: 'One main image with a title and text That surround the image.'
html: <h3> <img height="100" width="100" style="MARGIN-RIGHT: 10px" align="left"/> Type the title here </ h3> Type the text here </ p> '
}]
});
So if you want to create a plugin using the same features as the plugin "templates", such as "plugins / templatesheader", in the folder "dialogs", we must change the following line:
"var l = (j.templates | | 'default'). split (',');"
to
"var l = (j.templates | | 'header'). split (',');"
Re: multiple templates with different plugins
CKEDITOR.addTemplates ('header', { imagesPath: CKEDITOR.getUrl (CKEDITOR.plugins.getPath ('templates') + 'templates / images /') templates: [ { title: 'HEADER' Image: 'template1.gif' description: 'One main image with a title and text That surround the image.' html: <h3> <img height="100" width="100" style="MARGIN-RIGHT: 10px" align="left"/> Type the title here </ h3> Type the text here </ p> ' }] });So if you want to create a plugin using the same features as the plugin "templates", such as "plugins / templatesheader", in the folder "dialogs", we must change the following line:
"var l = (j.templates | | 'default'). split (',');"to
"var l = (j.templates | | 'header'). split (',');"