Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

edit_media_modal

2,398 sites No security coverage
View on drupal.org

The Edit Media Entity in Modal module for Drupal enhances the content editing experience by enabling users to edit media entities directly within a modal dialog. This functionality streamlines workflows, particularly for content creators and editors working with embedded media in rich text editors like CKEditor.
This module is ideal for Drupal sites aiming to provide a more efficient and user-friendly media editing experience.

🛠 Installation

To install the module, run the following commands:

composer require drupal/edit_media_modal
drush en edit_media_modal

Version 2.x

For CKEditor 5 support, ensure you're using version 2.0.0 or higher.

📹 Demonstration

For a visual demonstration of the module in action, refer to the following video:
https://youtu.be/hgTfaZcjzXw

Usage

As default module provides an edit media link for the EditorMediaDialog. But You will be able to use this improvement in the many places where do you need that.

  $form['edit_media_link'] = $media->toLink($this->t('Edit this media'), 'edit-form', [
    'query' => [
      'edit_media_in_modal' => TRUE, // Add that to have ajax actions for the media edit form.
      'destination' => \Drupal\Core\Url::fromRoute('<front>')->toString(), // Add that if you need redirect somewhere after submitting.
    ],
  ])->toRenderable();

  $form['edit_media_link']['#attributes'] = [
    'class' => [
      'js-media-library-edit-modal-link',
      'media-library-edit__modal-link',
      'use-ajax',
      'button',
    ],
    'target' => '_self',
    'data-dialog-options' => json_encode([
      'height' => '75%',
      'width' => '75%',
      'classes' => [
        'ui-dialog-content' => 'media-library-edit__modal-link',
      ],
    ]),
    'data-dialog-type' => 'modal',
  ];

Activity

Total releases
2
First release
Aug 2025
Latest release
5 months ago
Release cadence
82 days
Stability
100% stable

Releases

Version Type Release date
2.1.0 Stable Oct 22, 2025
2.0.2 Stable Aug 1, 2025