Skip to content

Instantly share code, notes, and snippets.

@1stevengrant
Created May 3, 2016 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1stevengrant/775482d08f17a258d330b5401bbc8704 to your computer and use it in GitHub Desktop.
Save 1stevengrant/775482d08f17a258d330b5401bbc8704 to your computer and use it in GitHub Desktop.
Config for Wygwam templates
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.addTemplates("default", {
imagesPath: CKEDITOR.getUrl("/build/wygwam/"),
templates: [{
title: "Image on left with caption",
image: "img-left.png",
description: "Add an image on the left with caption",
html: '<figure class="image image--left"><img src="http://placeimg.com/463/251/arch" alt=""><figcaption>Your caption right here</figcaption></figure>'
}, {
title: "Image on the right with caption",
image: "img-right.png",
description: "Add an image on the right with caption",
html: '<figure class="image image--right"><img src="http://placeimg.com/463/251/arch" alt=""><figcaption>Your caption right here</figcaption></figure>'
}, {
title: "Book review",
image: "img-right.png",
description: "Add a book listing with an image floated right",
html: '<div class="Media Media--reverse"><div class="Media-figure"><img src="http://placeimg.com/100/150" alt=""></div><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sit amet massa tellus, ac faucibus urna. Donec eget risus elit, quis pellentesque purus. Ut purus nibh, elementum ac ullamcorper consequat, vehicula et risus. Integer venenatis mauris ut ante vestibulum ullamcorper auctor nisi varius. Sed at metus ligula.</p></div>'
}]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment