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
- Go to
/admin/config/content/formats/manage/full_text
page, uncheck the "Limit allowed HTML tags and correct faulty HTML" option and save. - 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>
- 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
.