I'm currently trying to override the default templates to allow my users to enter formatted content. I'm able to override the styles and toolbar, but not the templates. Is there a way to override the templates without having to add a new .js file or modify the existing one?
This is an example of the code I am working with. stylesSet and toolbar both work in overriding the default values, but templates and addTemplates don't work. Any help would be much appreciated.
$('#EditorName').ckeditor({
stylesSet: [
{ name: 'Test', element: 'div', attributes: {'class': 'Test'} }
],
templates: [
{
title: 'Test title',
image: 'test.png',
description: 'Test description',
html: '<div>asd</div>'
}
],
toolbar: [
['Styles', 'Format', 'Templates'],
['Bold', 'Italic', 'Strike'],
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent'],
['Link', 'Unlink', 'Anchor']
]
});
This is an example of the code I am working with. stylesSet and toolbar both work in overriding the default values, but templates and addTemplates don't work. Any help would be much appreciated.
$('#EditorName').ckeditor({
stylesSet: [
{ name: 'Test', element: 'div', attributes: {'class': 'Test'} }
],
templates: [
{
title: 'Test title',
image: 'test.png',
description: 'Test description',
html: '<div>asd</div>'
}
],
toolbar: [
['Styles', 'Format', 'Templates'],
['Bold', 'Italic', 'Strike'],
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent'],
['Link', 'Unlink', 'Anchor']
]
});