-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imageResizable style dimensions stripped on subsequent save #192
Comments
@lukasgeiter you may want to ensure you don't have the "Remove inline styles" option checked in the advanced section of the field's settings. |
I took a rather deep dive through Redactor's code. It appears that Redactor sanitizes the field value on load, which also includes removing the So, I went ahead and overrode that behavior, allowing the |
This will be included in the next release! |
@andris-sevcenko Thanks! |
When using a redactor field with
imageResizable
enabled, resizing the image and then saving adds astyle
attribute to the<img>
element which declares width and height of the image:However whenever I save the entry without resizing the image, the
style
attribute is removed.I would expect the
style
attribute to remain the same when saving multiple times without making any changes. As a workaround, authors always have to remember to resize images slightly before saving to retain the attribute, which is far from ideal.Steps to reproduce:
style
attribute is setstyle
attribute is removedVersions:
Craft: 3.3.18.4
Redactor Plugin: 2.4.0
The text was updated successfully, but these errors were encountered: