c3d2-web/content/static/candy/plugins/inline-images
2015-07-22 01:01:23 +02:00
..
candy.css candy 2.0 + plugins 2015-07-22 01:01:23 +02:00
candy.js candy 2.0 + plugins 2015-07-22 01:01:23 +02:00
overlay.png candy 2.0 + plugins 2015-07-22 01:01:23 +02:00
README.md candy 2.0 + plugins 2015-07-22 01:01:23 +02:00
screenshot.png candy 2.0 + plugins 2015-07-22 01:01:23 +02:00
spinner.gif candy 2.0 + plugins 2015-07-22 01:01:23 +02:00

Inline Images

If a user posts a URL to an image, that image gets rendered directly inside of Candy.

Inline Images

Usage

Include the JavaScript and CSS files:

<script type="text/javascript" src="candyshop/inline-images/candy.js"></script>
<link rel="stylesheet" type="text/css" href="candyshop/inline-images/candy.css" />

To enable the Inline Images plugin, just add one of the ´init´ methods to your bootstrap:

// init with default settings:
CandyShop.InlineImages.init();

// customized initialization:
CandyShop.InlineImages.initWithFileExtensions(['png','jpg']);  // only recognize PNG and JPG files as image
CandyShop.InlineImages.initWithMaxImageSize(150);  // resize images to a maximum edge size of 150px
CandyShop.InlineImages.initWithFileExtensionsAndMaxImageSize(['png','jpg'], 150);  // combination of the above examples