title: Changing how TinyMCE aligns images center
body: <p>I'm using TinyMCE 4.0 to construct HTML emails, I need to change the way that TinyMCE centers the image.</p>
  
  <p>I've seen solutions after searching around which involve using classes, but this is not the way I want to do this due wanting to keep email client compatibility..</p>
  
  <p>I've found where img's are centered, but can't find a way to do what I want to do</p>
  
  <pre><code>aligncenter: [{
      selector: "figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",
      styles: {
          textAlign: "center"
      },
      defaultBlock: "div"
  }, {
      selector: "img",
      collapsed: !1,
      styles: {
          display: "block",
          marginLeft: "auto",
          marginRight: "auto"
      }
  }
  </code></pre>
  
  <p>All I need to do is..</p>
  
  <p>When a img is selected and aligncenter is clicked, wrap the image in</p>
  
  <pre><code>&lt;p style="text-align: center"&gt;&lt;img /&gt;&lt;/p&gt;
  </code></pre>
  
  <p>If anybody has any tips on how this can be achieved it would be much appreciated because I'm pulling my hair out trying to provide a solution to this problem at present.</p>
  
  <p>Regards,</p>
  
  <p>Charj</p>