Hi,
i have a website in which i use ckeditor.
I want that a logged user can use default templates and his customized template.
I put default templates in /upload/default_templates/site_default.js
I put customized templates in /upload/USERNAME/editor_templates/site_default.js with a code like the previous one.
In config.js i put the following code:
where frm.sia.value identifies user logged.
With such code, i can use only templates included in last path ('/upload/'+frm.sia.value+'/editor_templates/site_default.js').
If i write:
i can use only templates included in '/upload/default_templates/site_default.js'.
What's the problem?
Thank you in advance for your support,
Giuseppe
i have a website in which i use ckeditor.
I want that a logged user can use default templates and his customized template.
I put default templates in /upload/default_templates/site_default.js
CKEDITOR.addTemplates( 'default',
{
imagesPath : CKEDITOR.getUrl( CKEDITOR.plugins.getPath( 'templates' ) + 'templates/images/' ),
templates :
[
{
title: 'Default Template 1',
image: 'template1.gif'
...
}
]
};
I put customized templates in /upload/USERNAME/editor_templates/site_default.js with a code like the previous one.
In config.js i put the following code:
CKEDITOR.editorConfig = function( config )
{
config.templates_files =
[
'/upload/default_templates/site_default.js',
'/upload/'+frm.sia.value+'/editor_templates/site_default.js'
];
}
where frm.sia.value identifies user logged.
With such code, i can use only templates included in last path ('/upload/'+frm.sia.value+'/editor_templates/site_default.js').
If i write:
CKEDITOR.editorConfig = function( config )
{
config.templates_files =
[
'/upload/'+frm.sia.value+'/editor_templates/site_default.js',
'/upload/default_templates/site_default.js'
];
}
i can use only templates included in '/upload/default_templates/site_default.js'.
What's the problem?
Thank you in advance for your support,
Giuseppe

Re: More templates customizable
Re: More templates customizable