0

I am trying to use the Drupal Media insert button in the CKEditor5 module. (Important - the existing images were included using CKEditor4 and are inline images, not using Drupal Media.)

I upload the image I want to the Media Library and then select it in CKEditor5.

You can see that the image appears in the dialog box. But when I save nothing appears on the actual page.

Showing where the Drupal media image should appear

The HTML, where the image should appear, looks like this:

<tr>
  <td>
    <drupal-media data-entity-type="media" data-entity-uuid="5acaee67-a8fe-4265-81d2-82099838073b" data-align="center">&nbsp;</drupal-media>
  </td>
</tr>

How do I get it to show? I've read everything I can find but no joy.

4
  • 1
    You have to add the button to the editor AND enable the CKeditor text filter at /admin/config/content/formats. Also ordering of those filters matters, if active try moving upwards or downwards
    – Hudri
    Feb 7 at 11:59
  • They are. The ordering does matter and it's correct - it has to be after align and caption, I've had it at the end, and also just before "fix faulty HTML". It makes no difference. Feb 8 at 11:54
  • This could also be the theme not applying text filters. Did you try to switch the theme?
    – 4uk4
    Feb 9 at 9:54
  • Ran into the exact same issue. Disabled all filters except "Embed media" and problem still occurs. If you figure this out please let us know.
    – kenchilada
    Feb 21 at 20:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.