Aloha Editor

These guides help you to make your content editable and to develop Aloha Editor.

The Captioned Image Plugin

After reading this guide, you will be able to:

  • Understand what Captioned Image Plugin isand how to use it

This guide is currently work-in-progress.

1 What is a Captioned Image?

Captioned Image is used in Aloha Editor to display an image with a caption (as AE Block).


	<img src="http://www.aloha-editor.org/logo/Aloha%20Editor%20HTML5%20sticker%20transparent%20256.png"
		alt="Sample alt text"
		data-caption="Short caption."
		class="aloha-captioned-image"
	/>

This will create an AE Block containing an image with a caption.

1.1 Using Configuration


	Aloha.settings.plugins.captionedImage: {
		allowLinebreak: false, // ['br', 'p'], true or false (default)
		selector: 'img.aloha-captioned-image',
		render: function (properties, callback, error) {
			error({message: 'noop'});
		},
		defaultCSS: false,
		captionedImageClass: 'aloha-captioned-image',
		blockClass: 'mycms-captioned-image-block'
	}