The link of the parent of the image node cannot be saved successfully

Created on 21 June 2024, 10 months ago

Problem/Motivation

Premise: "Limit allowed HTML tags and correct faulty HTML" setting is unchecked.

For already saved pages, it is not possible to change the link around the image again.

Steps to reproduce

  1. Go to /admin/config/content/formats/manage/full_text page, uncheck the "Limit allowed HTML tags and correct faulty HTML" option and save.
  2. Create a new article, insert an image in CKEditor, add a link to the image, and save. Source code: <a href="https://www.google.com"><img src="demo.png"></a>
  3. Edit the article again, modify the image link, and save the page. The link is not updated.

Proposed resolution

Add logic to update htmlLinkAttributes in core/modules/ckeditor5/js/ckeditor5_plugins/drupalImage/src/drupalimageediting.js.

🐛 Bug report
Status

Active

Version

10.2

Component
CKEditor 5 

Last updated 3 days ago

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024