Skip to content
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

Support for image height attribute #14763

Merged
merged 143 commits into from
Sep 14, 2023

Conversation

mmotyczynska
Copy link
Contributor

@mmotyczynska mmotyczynska commented Aug 7, 2023

Suggested merge commit message (convention)

Feature (image): The image width and height attributes are preserved while loading editor content. Closes #14146.

Feature (image): Images without size specified will automatically gain natural image size on any interaction with the image. See #14146.

MAJOR BREAKING CHANGE (image): The model attribute name of the resized image is now changed to resizedWidth. The width and height attributes are now used to preserve the image's natural width and height.

MAJOR BREAKING CHANGE (image): The srcset model attribute has been simplified. It is no longer an object { data: "...", width: "..." }, but a value previously stored in the data part.


Additional information

⚠️ There is also a PR in ckeditor5-commercial:

https://github.com/cksource/ckeditor5-commercial/pull/5505
We had to update image model attribute name from width to resizedWidth.

…mage-width-and-height

Feature (image): It should be possible to load and preserve image width and height attributes. Closes #14201.

MAJOR BREAKING CHANGE (image): The name of the image resize width attribute has been changed to resizedWidth. The width and height attributes are now used to preserve image width and height.

MAJOR BREAKING CHANGE (image): The srcset attribute has been simplified. It is no longer an object { data: "...", width: "..." }, but a value previously stored in the data part.
packages/ckeditor5-image/src/imagesizeattributes.ts Outdated Show resolved Hide resolved
packages/ckeditor5-image/src/imageutils.ts Outdated Show resolved Hide resolved
packages/ckeditor5-image/src/imageutils.ts Show resolved Hide resolved
packages/ckeditor5-image/src/imageutils.ts Outdated Show resolved Hide resolved
@pszczesniak
Copy link
Contributor

Please ping me or @godai78 when this PR will be merged, we need to check how it works with PfO and PfOE plugins. It will be needed to update comparison table of those plugins 👉 https://github.com/cksource/ckeditor5-commercial/pull/5493#issuecomment-1713988801.

@godai78
Copy link
Contributor

godai78 commented Sep 14, 2023

Let's remember to add these to the Updating guide: #14981

@niegowski niegowski merged commit 58e9c88 into master Sep 14, 2023
@niegowski niegowski deleted the ck/epic/14146-support-image-height-attribute branch September 14, 2023 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🖼️ Supporting image height attribute
6 participants