fix: display mj-image containing width="100%" correctly instead of showing the default mj-body width (550px)
Hello,
I'm facing the following issue:
When inserting an mj-image block, the image is shown in its original size in the canvas and not being stretched to fit the container. However the generated HTML has it taking up the whole available space.
I've checked the demo page and there it reflects the generated HTML.
When changing the width property from auto to a pixel value, it is updated accordingly but changing it back to auto breaks the view and it's no longer possible to select the image inside the canvas. Also % values act like pixel values.
Update:
Seems like the demo page is using
v.0.1.10
.Checked the changelog for
v0.2.9
:Hello,
I'm facing the following issue:
When inserting an
mj-image
block, the image is shown in its original size in the canvas and not being stretched to fit the container. However the generated HTML has it taking up the whole available space.I've checked the demo page and there it reflects the generated HTML.
When changing the
width
property fromauto
to a pixel value, it is updated accordingly but changing it back toauto
breaks the view and it's no longer possible to select the image inside the canvas. Also % values act like pixel values.Configuration:
grapesjs: 0.17.27
grapesjs-mjml: 0.5.6
Current behaviour![screenshot-grapesjs-mjml-error](https://user-images.githubusercontent.com/19635225/137576063-df1cb561-77c0-4b90-8f67-425e6120f612.png)
vs.
GrapesJS-MJML demo page![screenshot-grapesjs-mjml-demo](https://user-images.githubusercontent.com/19635225/137576064-40bc398f-f46b-4918-8a7b-35142f06e696.png)
Steps to reproduce:
width
property to any pixel valuewidth
back toauto
(<-- breaks view)Thanks in advance.