18 Replies Latest reply on Sep 8, 2016 3:34 PM by Justin Cooperman

    mktoImgWidth not working in 2.0 email templates

      Hello,

       

      I'm currently struggling with the new Editor v2.0 image inclusion methods.

       

      I am using the div method. As per the syntax page, I am using the following markup:

       

      <div class="mktoImg" id="article-image" mktoName="Article Image" mktoImgLink="" mktoImgSrc="http://placehold.it/210x150/" mktoImgWidth="210">  
           <a style="text-decoration:none;color:#0563c1;"><img style="border-width:0;height:auto;display:block;width:100%;max-width:210px;" /></a>
      </div>
      

       

      When I use my template and add an image, it ignores mktoImgWidth.

       

      They wrong dimensions appear in the Dimensions fields when I upload the new image:

       

      Screen Shot 2016-07-29 at 7.04.39 PM.png

       

      Then when I inspect the code on the preview, this is how it has turned out (asset URL edited for brevity):

       

      <div class="mktoImg" id="article-image" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;">
      <a style="text-decoration:none;color:#0563c1;" href="http://www.test.com/" target="_blank">
      <img style="border-width:0;height:auto;display:block;width:100%;max-width:210px;" src="/index.php/lpTemplate/proxyAsset?idx=xxx" width="550" height="367">
      </a>
      </div>
      

       

      As you can see, it's generating width="550", and there is a fixed pixel height set on the image which I do not want.

       

      I have tried setting up images using variables instead, but this is no longer viable since I discovered that any variable used in a module is global. I am trying to create article modules that users can duplicate to add as many news items as they like; this obviously doesn't work if they all have the same image.

       

      Any help much appreciated!