- ๐บ๐ธUnited States bkosborne New Jersey, USA
I wonder if anyone has tested how this works in CKEditor 5? Maybe it's easier to accomplish there?
- ๐บ๐ธUnited States scotwith1t Birmingham, AL
Still seeing problems with this in CKEditor 5 with D10.1.2. While adjusting the order of the filters does link the image (Yay!) the markup is still broken.
This is compounded and becomes particularly visible when using ExtLink module, where the broken markup results in multiple external link icons being added.
- ๐บ๐ธUnited States cewernlund
Just wanted to say the comment in #28 worked for me. I was thinking something in the Text Editor format might be the culprit and this proves it. Many thanks for reporting it!
- First commit to issue fork.
- last update
9 months ago 30,358 pass, 2 fail - @jayhuskins opened merge request.
- ๐บ๐ธUnited States jayhuskins
Here is a patch for 10.1.5 that simply removes the ability to link media.
- ๐บ๐ธUnited States scotwith1t Birmingham, AL
I don't know about others but, to me, removing the ability to link media altogether is not a viable solution. Linking media is a critical function for many sites.
- ๐ฉ๐ชGermany marcoka
@scotwith1t yes, i agree, of course that is an important function. Linking media is used everywhere :)
- ๐บ๐ธUnited States loze
I think all the options available in ckeditor5 (edit, link, align, caption, etc.) should all be configurable on the media bundle, or view mode.
Is that possible?
- ๐บ๐ธUnited States scotwith1t Birmingham, AL
@loze While that would definitely be a great feature, it doesn't really fit into the scope of what's being addressed in this issue. See https://www.drupal.org/project/media_embed_view_mode_restrictions โ contrib module which was created out of #3308069: Provide per-bundle configuration for embeddable view modes โ as a potential solution (tho it doesn't have a D10 release yet).
- ๐ฉ๐ชGermany rgpublic Dรผsseldorf ๐ฉ๐ช ๐ช๐บ
Well, the main problem seems to be (IMHO) that way to many field templates (e.g. core/themes/stable9/templates/field/field.html.twig and many more) in Drupal contain a div tag when they should better use a span tag, I guess. A span tag would be more correct because a whole field, for example, is an inline element. There can be multiple fields in a row. As long as they are all using div tags, they can never appear inside a p tag :-(
- ๐บ๐ธUnited States millerrs
- ๐บ๐ธUnited States chuck_theobald
On Drupal 10, CKEditor 5, fully updated Media tooling:
FWIW, the issue I am seeing is a link with no content, followed by the image.
Seen in CKEditor Source mode:
test media image link
Delivered to the browser:
Moving "Convert line breaks into HTML (i.e.
and)" to last in the processing order fixed the linking issue. My filter processing order:
Convert URLs into links
Advanced Insert View
Restrict images to this site
Align images
Caption images
Embed media
Display embedded entities
Linkit URL converter
Correct faulty and chopped off HTML
Convert line breaks into HTML (i.e.
and)
- ๐บ๐ธUnited States mortona2k Seattle
I ran into a similar issue as above.
I have a media view mode that displays an image linked to the file.
When it's embedded, the link is stripped.
The issue was with the order of filters, after moving things around the link worked.
- ๐ฉ๐ชGermany drubb Sindelfingen
I did something similar like in #28 or #54. While the image is correctly displayed and linked, there are still additional empty links before and after the image. Something like
<p><a></a></p> <p><a>Rendered image</a></p> <p><a></a></p>
It's weird!
- ๐บ๐ธUnited States caspervoogt
I was running into issues with linked media images not rendering as linked images. Disabling the 'Convert line breaks into HTML' filter fixed that for me. It was not enough for me to move it to the end of the list of filters. I also tested putting it first. Only disabling that filter solved it for me.