Captions


The captions are automatically created using the alt attribute of images. Moreover, if it doesn't exist, it is created using the title attribute of the links.

For example, the following entry have "I'm only in the alt" as caption.

<a href="imageurl.jpg">
    <img alt="I'm only in the alt" src="thumbnailurl.jpg" />
</a>

The following entry hasn't an alt, but it has a title. In this case the plugin will set "I'm only in the title" as caption.

<a href="imageurl.jpg" title="I'm only in the title">
    <img src="thumbnailurl.jpg" />
</a>

In this last example, we have both the title and the alt. In this case the plugin brings the text from the alt, and the caption will be "I'm in the alt".

<a href="imageurl.jpg" title="I'm in the title">
    <img alt="I'm in the alt" src="thumbnailurl.jpg" />
</a>

The plugin creates the captions inserting, for each entry, an extra div element just after the img element. The latter is build to have the class caption. To have custom captions you need only to insert this element on your own, with the content that you want. The plugin will skip the creation of the captions for the entries that already have a caption in the entry.

<a href="imageurl.jpg">
    <img src="thumbnailurl.jpg" />
    <div class="caption">
        I'm <span style="color:red">a</span> <strong>custom</strong> caption!
        <div>I'm a div</div>
    </div>
</a>

See how to use the captions with other input formats.