Replacing image is removing alt text from image

Created on 24 December 2024, 4 months ago

Problem/Motivation

  • Add the image and filled the alt text for the image

  • Click on the image and replace currently added image with new will not retain the old alt text.

Expected result

Make sure to keep the alt tag that functions in previous versions of CKE 5.

In version "35.4.0" it is working fine. (Drupal 10.0.3)

Not working into version "41.3.2" (Drupal 10.3.8)

Note: Please ignore the advisory title which is our custom changes.

We have tried to add attributeToAttribute but it is not going into that.

.attributeToAttribute({
view: {
name: 'img',
key: 'alt',
},
model: {
key: 'alt',
value: (viewElement) => {
return viewElement.getAttribute('alt');
},
},
})

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

ckeditor.module

Created by

🇮🇳India vipul tulse

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

Comments & Activities

Production build 0.71.5 2024