title: Add attributes to Insert Image dialogue of Umbraco RTE or Create Custom Data type
body: <p>How can I add attributes to the current Insert Image dialogue box on umbraco Richtext Editor? </p>
  
  <p>What I really want is to let content editor choose images and set their class, and maybe choose if this is lightbox image or not. If user choose lighbox option, then a hyper link  is added with some extra attributes, like data-rel. I even want to be able to modify the image url added by the content editor, if possible.</p>
  
  <p>The output should look like this</p>
  
  <pre><code>&lt;a href="/media/2813/DSC_2615.JPG" data-rel="prettyPhoto[gal-3-col]" &gt;    
     &lt;img src="http://domain.com/imageGen.ashx?
     image=%2fmedia%2f2813%2fDSC_2615.JPG&amp;amp;width=420" alt="DSC_2615" title="DSC_2615" 
     class="alignright"&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>I found this very useful link <a href="http://forum.umbraco.org/yaf_postst8163_TinyMCE--insert-image-dialog.aspx" rel="nofollow">http://forum.umbraco.org/yaf_postst8163_TinyMCE--insert-image-dialog.aspx</a> which solve half of my issue, but I can't figure out how to continue</p>