GrapesJS / mjml

Newsletter Builder with MJML components in GrapesJS

Home Page:http://grapesjs.com/demo-mjml.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image size does not respect specified units

shmsula opened this issue · comments

Description: When changing the image size units to percent, the image and the table cell do not adjust accordingly and remain in pixels.

Steps to reproduce:

Open https://grapesjs.com/demo-mjml.html
Select the image with car sciolino-paris-bw.jpg
Change the units to percent, and the value to 50
Observe that the td size will be set to 50px and the image to 50 without any units, instead of 50% of the parent element.

Reading the MJML documentation I understand that it only supports pixels. If this is correct, the problem is the dropdown, which should only allow pixels.

https://documentation.mjml.io/#mj-image

Is there an easy way to be able to hide the other units in the selector?