Adding link around images inserted with media library or entity_embed doesn't work

Created on 3 July 2019, over 5 years ago
Updated 23 February 2024, 9 months ago

Hello,

I've anchor_link 8.x-2.0-alpha2 installed on a Drupal8.7.3 site that's using the core Media module, and entity_embed 8.x-1.0.

Anchor Link will happily add links around text, but it fails silently when I try to add a link around an image inserted using entity_embed. There's no obvious warnings/errors in the JS console.

Entity_embed generates code like this:
<drupal-entity data-align="right" data-embed-button="images" data-entity-embed-display="entity_reference:media_thumbnail" data-entity-embed-display-settings="{&quot;image_style&quot;:&quot;media_library&quot;,&quot;image_link&quot;:&quot;&quot;}" data-entity-type="media" data-entity-uuid="ff3ebee3-0cfd-49f8-a36a-70ae1193c75e"></drupal-entity>

When I highlight the image, and click the link button for anchor_link in CKEditor, nothing is added to the source.

If I revert to using the link button in core CKEditor, then I can add links around images - but my authors really need the functionality provided by anchor_link.

Has anyone else come across this issue, or have ideas on how to troubleshoot it? Thanks!

🐛 Bug report
Status

Closed: won't fix

Component

Code

Created by

🇮🇪Ireland muckermarc

Live updates comments and jobs are added and updated live.
  • wysiwyg

    Involves an in-browser What-You-See-Is-What-You-Get content editor.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024