Hi!
Have had a look at the developer docs for custom template definitions: http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Templates
Have managed to return my custom template using a function in the definitions file:
CKEDITOR.addTemplates( 'default',
{
// The name of the subfolder that contains the preview images of the templates.
imagesPath : CKEDITOR.getUrl( CKEDITOR.plugins.getPath( 'templates' ) + 'templates/images/' ),
// Template definitions.
templates :
[
{
title: 'Schedule',
image: 'template1.gif',
description: 'Lorem ipsum...',
html: GetTable()
}
]
});
the GetTable() function return a html table. Now to my issue, I would like to retrieve the html from a php file using ajax/get, but cannot get this to work.
Have tried various ways, for example:
$.get( "js/test.html", function( data ) {
return data;
});
But nothing seems to work. Any suggestions to point me in the right direction is more than welcome.
Thanks!
