Hello!
I want to be able to define my templates in 2 separated files. I'm able to define those 2 files with the "config.templates_files" variable, but the "config.templates" variable doesn't seem to work. It only loads the first template set declared. In the documentation, it says :
Here is the code:
Inside the ckeditor_templates.js files, I have:
Thank you!
I want to be able to define my templates in 2 separated files. I'm able to define those 2 files with the "config.templates_files" variable, but the "config.templates" variable doesn't seem to work. It only loads the first template set declared. In the documentation, it says :
The templates definition set to use. It accepts a list of names separated by comma. It must match definitions loaded with the templates_files setting.But it doesn't work. I tried using an array instead but it didn't work either
Here is the code:
function CKEditorConfig(config) { config.templates_files = [ '/bundles/basebackendcore/js/ckeditor_templates.js', '/bundles/projectbackendcore/js/ckeditor_templates.js' ]; config.templates = 'default, project'; }
Inside the ckeditor_templates.js files, I have:
CKEDITOR.addTemplates('default', { // The name of the subfolder that contains the preview images of the templates. imagesPath : '/bundles/basebackendtext/images/templates/', // Template definitions. templates : [ // ... ] });
CKEDITOR.addTemplates('project', { // The name of the subfolder that contains the preview images of the templates. imagesPath : '/bundles/projectbackendtext/images/templates/', // Template definitions. templates : [ //... ] });
Thank you!
Re: Multiple templates files not working
I 've the same problem, you can edit default.js definition and add into templates definitions like..
Re: Multiple templates sets not working
Re: Multiple templates sets not working
Hi!
I have managed to load the templates from other JavaScript file.
I have additional templates file (I've called miplantilla.js) into the templates directory (this directory I have created to better organize the structure of my site).
Then in the file of ckeditor config.js I have indicated the absolute path to the file as follows:
Multiple template files
I have this issue, did you ever manage to resolve it please?
Steve
Multiple template files
I have this issue, did you ever manage to resolve it please?
Steve