2

I've successfully used WYGWAM (CK Editor) Styles before but I cannot get the Templates to work. I have a relative path in my WYGWAM settings like so:

enter image description here

And I'm just getting this:

enter image description here

I have the following code in my "wygwam_templates.js" file:

    // Register a template definition set named "default".
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: 'Insert Location Map',
            description: 'Using this will add the interactive map to this page',
            html:
                '<img src="/images/layout/locations_map.jpg" usemap="#locations" />' +
                '<map name="locations" id="locations">' +
                    '<area id="corporate" shape="rect" coords="46,97,170,136" href="#" />' +
                    '<area id="brazil" shape="rect" coords="207,246,257,277" href="#" />' +
                    '<area id="uruguay" shape="rect" coords="202,299,265,324" href="#" />' +
                    '<area id="germany" shape="rect" coords="293,76,354,105" href="#" />' +
                    '<area id="italy" shape="rect" coords="350,102,392,119" href="#" />' +
                    '<area id="india" shape="rect" coords="478,158,524,178" href="#" />' +
                    '<area id="china" shape="rect" coords="551,140,595,163" href="#" />' +
                '</map>'
        }


    ]

});

I love the ideas of the Templates but for the life of me I can't get it to work. Any help would be great!

I'm using EE 2.72 and Wygwam 3.2.1

1

1 Answer 1

1

Okay you must set "template_files" to reference your JS file. You also must update your CKEditor JS files as seen here: http://get-simple.info/forums/showthread.php?tid=1976

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.