[3.x] Remove dependency on "drupal/embed" contrib module

Created on 3 March 2023, almost 2 years ago
Updated 3 April 2024, 9 months ago

Background

As originally described in ✨ CKEditor 5 Support Fixed , this module was architected within the Embed β†’ module ecosystem, which provides a unified API to embed things in the context of Drupal's rich text editor (CKEditor). On the surface this makes sense and holds the promise of reducing the code and complexity of each implementer.

However, unlike the four other modules that implement the Embed API, "URL Embed" does not embed Drupal content, but rather external content using the oEmbed provider. The Embed API supports implementers providing different plugins for different types of embeds, which isn't relevant in the context of the single URL embed plugin.

Proposal

We should consider refactoring this module so that it no longer is dependent on the Embed API.

Reasons to do this

  • The url_embed module would no longer declare a module dependency on embed, simplifying updates.
  • The url_embed module would no longer need to implement the multiple icons configuration that is not relevant to it.

Reasons not to do this

  • Sites which have already installedurl_embed (1.x or 2.x) would have a module (and *plugin*, which has no standard way of being marked deprecated) dependency inherited from the embed module; updating to a version that does not have that dependency would require deletion of the plugin from config. This likely means a new major version increment for url_embed.
  • Most of this would be direct copy-paste of some helper methods, such as the UrlEmbedInsertCommand AJAX logic and the DomHelperTrait, resulting in duplicative code.
  • The url_embed module *can* be designed to still work with the embed API, and doing so would take less effort than removing the dependency.

Next steps

Decide whether this should be done or not, and either close this issue as "Won't Fix" or make a roadmap for the update.

πŸ“Œ Task
Status

Closed: won't fix

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024