Skip to content

CKEditor Media Embed Plugin Documentation

A Drupal module that adds the CKEditor 5 Media embed plugin to Drupal, so editors can put videos, posts and maps from other sites into their content by pasting a URL.

What is CKEditor Media Embed Plugin?

CKEditor Media Embed Plugin gives CKEditor 5 in Drupal an Insert media button. An editor pastes a media URL, for example a YouTube link, and the editor saves it as an <oembed url="..."> element.

When the text is displayed, the Convert Oembed tags to media embeds filter asks an oEmbed provider for the embed HTML and puts that HTML in the page. The content keeps the URL, not the embed code.

Key features

  • Insert media button: embed a media URL from the CKEditor 5 toolbar.
  • Previews while editing: YouTube, Vimeo, Dailymotion and Spotify links show a live preview in the editor.
  • Semantic storage: only the URL is saved. The content carries no embed code; the provider builds it when the page renders.
  • One configurable provider: Iframely by default, or Noembed, embed.ly or any other oEmbed service.
  • Accessible iframes: the title the provider returns is set on the embed's iframe.
  • Link field formatter: render the URL of a link field as an embed.
  • Status report check: the site reports a missing plugin library, or one that does not match core's CKEditor 5.
  • Drush commands: download the plugin library from npm.

Getting started

For content editors

If you write content and want to embed media:

For site administrators

If you configure text formats and editor toolbars:

For developers

If you extend or integrate with the module:

Testing

Requirements

  • Drupal 10.3 or later, or Drupal 11
  • Drupal core CKEditor 5
  • The CKEditor 5 Media embed plugin library in libraries/ckeditor5/plugins/media-embed, from vardot/ckeditor5-media-embed-drupal (~47.6.2 for Drupal 11.4) or from the module's Drush command
  • An oEmbed provider your server can reach

Need help?

  • Check the FAQ for common questions
  • Review the documentation section that matches your role
  • Search the issue queue before filing something new