Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
I would like to link images to a hyperlink like so:
<p><a data-entity-substitution="file" data-entity-type="file" data-entity-uuid="8f9fc629-ecc1-4344-9d2d-31d86056792a" href="#"><img alt="OQL - Bll of Lading" data-entity-type="file" data-entity-uuid="88843db5-2ef0-4747-a709-48c477a018f0" src="/sites/default/files/inline-images/oql-bill-of-lading_png.png" /></a></p>
Currently it is not possible to add hyperlinks with the CKEditor to images that were added with the media browser.
<p><a data-entity-substitution="file" data-entity-type="file" data-entity-uuid="8f9fc629-ecc1-4344-9d2d-31d86056792a" href="#">#</a></p>
<drupal-entity data-embed-button="media_browser" data-entity-embed-display="view_mode:media.embedded" data-entity-type="media" data-entity-uuid="293c336b-5948-48c2-a8ea-6d1f93f338ec"></drupal-entity>
In above examples I am using the LinkIt Module
Comment | File | Size | Author |
---|---|---|---|
media-browser-images-hyperlink-ckeditor.png | 7.13 KB | criscom |
Comments
Comment #2
criscomComment #3
phenaproximaFixing this is beyond Lightning's scope -- it concerns Entity Embed's integration with CKEditor, so should be fixed in Entity Embed.
Comment #4
torsti CreditAttribution: torsti as a volunteer commentedAny chance to get this fixed?
Comment #5
marcoscanoComment #6
a.milkovskyLooks like a duplicate of #2511404: Image entities/fields embedded using Entity Embed cannot be linked in CKEditor
Comment #7
Wim LeersAgreed.