I like the output for images in this form:
<dl class="foo">
<dt><image src="foo" width="xx" height="xx" alt="alt" title="caption" /></dt>
<dd>caption</dd></dl>
This seems to be more semantic than using divs.
To achieve this with MODx I created three TVs: class_image, class_caption and image (with image widget) and wrote a litte snippet:
<?php
$output=’’;
$class=’’;
$caption=’’;
$idname=$modx->getTemplateVarOutput(’class_image’,$modx->documentIdentifier);
if($idname[’class_image’]!=’’) $class.=$idname[’class_image’];
$idname=$modx->getTemplateVarOutput(’caption_image’,$modx->documentIdentifier);
if($idname[’caption_image’]!=’’) $caption.=$idname[’caption_image’];
$idname=$modx->getTemplateVarOutput(’image’,$modx->documentIdentifier);
if($idname[’image’]!=’’) $output.=’<dl class="’.$class.’"><dt>’.$idname[’image’].’</dt>’.$caption.’<dd></dd></dl>’;
return $output;
?>
This works fine. But taking a closer look at the output I missed the width and the height.

Does anyone knows a solution? Or is it possible to get this output with TinyMCE?
Thank you for sharing your ideas.