From d56cbf338b101a7b3501b8b48ddfb1f0b8fbb660 Mon Sep 17 00:00:00 2001 From: Marta Motyczynska Date: Mon, 30 Oct 2023 13:34:55 +0100 Subject: [PATCH 1/2] Add HTML markups for changes in images in migration guide to v40. --- docs/updating/update-to-40.md | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/docs/updating/update-to-40.md b/docs/updating/update-to-40.md index ec723c96ad4..278c90b71fb 100644 --- a/docs/updating/update-to-40.md +++ b/docs/updating/update-to-40.md @@ -32,6 +32,34 @@ This release introduces changes to the {@link features/images-overview image fea * Changes to an image (such as resize, etc.) will trigger the creation of those attributes. These attributes are crucial to proper content handling, and actions on a current image that does not have these improve this image's markup. * The `aspect-ratio` attribute has been added to the image's properties to handle situations when the file is resized or scaled with a tweaked aspect ratio. +Image output HTML before: +```html +

+ +

+``` + +Image output HTML after (added `width` and `height` attributes): +```html +

+ +

+``` + +Resized image output HTML before: +```html +

+ +

+``` + +Resized image output HTML after (added `aspect-ratio` style and `width` and `height` attributes): +```html +

+ +

+``` + #### Changes to the model Due to the introduction of this new behavior, the following changes to model attributes have been introduced: @@ -46,6 +74,27 @@ Therefore, the relation between styles and attributes toward model attributes lo * Attribute `width` → model `width` (new). * Attribute `height` → model `height` (new). +Given the following input HTML: +```html +

+ +

+``` + +Previously, the model would set the resized value in the `width` model attribute and ignore the input `width` and `height` attributes: +```html + + + +``` + +And now the resized value is stored in the `resizedWidth` attribute (the `width` attribute is now reserved for the natural width value): +```html + + + +``` + #### Changes to the `srcset` attribute The `srcset` model attribute which provides parameters for responsive images, has been simplified. It is no longer an object `{ data: "...", width: "..." }`, but the value that was previously stored in the `data` part. From cf6a37cb0997e38f623b8baa85f9b0228e15419c Mon Sep 17 00:00:00 2001 From: godai78 Date: Mon, 30 Oct 2023 14:26:41 +0100 Subject: [PATCH 2/2] Docs: a review. [short flow] --- docs/updating/update-to-40.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/updating/update-to-40.md b/docs/updating/update-to-40.md index 278c90b71fb..fca06e7573c 100644 --- a/docs/updating/update-to-40.md +++ b/docs/updating/update-to-40.md @@ -33,13 +33,15 @@ This release introduces changes to the {@link features/images-overview image fea * The `aspect-ratio` attribute has been added to the image's properties to handle situations when the file is resized or scaled with a tweaked aspect ratio. Image output HTML before: + ```html

``` -Image output HTML after (added `width` and `height` attributes): +Image output HTML after (added the `width` and `height` attributes): + ```html

@@ -47,13 +49,15 @@ Image output HTML after (added `width` and `height` attributes): ``` Resized image output HTML before: + ```html

``` -Resized image output HTML after (added `aspect-ratio` style and `width` and `height` attributes): +Resized image output HTML after (added the `aspect-ratio` style and the `width` and `height` attributes): + ```html

@@ -75,6 +79,7 @@ Therefore, the relation between styles and attributes toward model attributes lo * Attribute `height` → model `height` (new). Given the following input HTML: + ```html

@@ -82,6 +87,7 @@ Given the following input HTML: ``` Previously, the model would set the resized value in the `width` model attribute and ignore the input `width` and `height` attributes: + ```html @@ -89,6 +95,7 @@ Previously, the model would set the resized value in the `width` model attribute ``` And now the resized value is stored in the `resizedWidth` attribute (the `width` attribute is now reserved for the natural width value): + ```html @@ -101,7 +108,7 @@ The `srcset` model attribute which provides parameters for responsive images, ha #### Changes to content styles -Last but not least, content styles have been updated with this release, which means you need to update them in your editor implementation to avoid any discrepancies. Please refer to the {@link installation/advanced/content-styles Content styles} guide to learn how to generate the stylesheet. +Last but not least, content styles have been updated with this release, which means you need to update them in your editor implementation to avoid any discrepancies. Please refer to the {@link installation/advanced/content-styles Content styles} guide to learn how to generate the style sheet. ### Changes to the comments feature