Integration / TinyMCE Option: moxiemanager_image_template

This TinyMCE specific option enables you to insert the selected images as custom HTML. The option expects an HTML string with variables that gets replaced with file data. This template is used by the insertfile toolbar button and gets used when you insert images.

url Url to the selected file.
name Name of the selected file.
path Absolute path to the selected file.
size Size of the selected file in bytes.
parentPath Absolute path to the parent directory of the selected file.
meta.width Width of the selected image.
meta.height Height of the selected image.
meta.thumb_url Url to the thumbnail for the selected image.
meta.thumb_width Width of the thumbnail for the selected image.
meta.thumb_height Height of the thumbnail for the selected image.

Variable values can also be encoded to various formats. These are the built in encoders:

urlencode Encodes the variable in url encoding format.
xmlEncode Encodes the variable in XML encoding. For example these: < > & " '.
sizeSuffix Adds a suffix to sizes for kb/mb etc.

Insert image thumbnail with lightbox link to fullsize image:

moxiemanager_image_template: '<a href="{$url}" rel="lightbox"><img src="{$meta.thumb_url}" /></a>'