2

Adding custom templates with Ckeditor Module

http://drupal.org

Hi, previous versions of the ckeditor module allowed me to add my own templates to the editor by adding the following line in the ckeditor.config.js:

config.templates_files = [ '/sites/all/themes/THEMENAME/js/templates.js' ];

And then including my own templates.js file:

CKEDITOR.addTemplates('default',
{
imagesPath : CKEDITOR.getUrl('/sites/all/themes/THEMENAME/img/'),

// Template definitions.
templates :
[
{
title: 'Bordered Photo',
image: 'BorderedPhoto.png',
html:
'Some HTML'
}
]
});

After the latest significant update, I haven't been able to get it to work. Here is the same code:

CKEDITOR.editorConfig = function(config) {
config.templates_files = [ '/sites/all/themes/THEMENAME/js/templates.js' ];

Are there any new steps to get this to work?

Read »
Created by Dplanet 22 weeks 5 days ago
Category: News   Tags:

PSD to Drupal Theme

Drupal Development

Module Development

Get an Estimate

Tags for Adding custom templates with Ckeditor Module

Recent comments