data-responsive-image-style attribute missing in editor

Created on 13 December 2023, 11 months ago
Updated 19 April 2024, 7 months ago

Problem/Motivation

In trying to style the image inside CKEditor, we noticed that the data-responsive-image-style attribute is missing there, despite being present in the filtered HTML in the frontend.

Steps to reproduce

Add an image, select a responsive image style. Inspect the element and see that there is no way to see what image style was selected through a class or attribute.

Proposed resolution

A patch is attached that adds an editing downcast that adds a data-responsive-image-style attribute, adapted from the way Drupal does this for it's drupalImage CKEditor 5 plugin.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇳🇱Netherlands dennis_meuwissen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024