Drupal is a registered trademark of Dries Buytaert
drupal 10.6.12 Update released for Drupal core (10.6.12)! drupal 11.3.13 Update released for Drupal core (11.3.13)! drupal 10.6.11 Update released for Drupal core (10.6.11)! drupal 11.3.12 Update released for Drupal core (11.3.12)! drupal 11.2.14 Update released for Drupal core (11.2.14)! drupal 10.5.12 Update released for Drupal core (10.5.12)! cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)!

Automatically loads required AJAX dialog libraries when text formats contain links using the use-ajax class.

This is currently work in progress (WIP) - please help to get this tested and finished!

See https://www.drupal.org/docs/develop/drupal-apis/ajax-api/ajax-dialog-box... for examples.

Important: Only enable this for higher level text formats like "Full HTML" for user roles you can trust!
Enabling this text filter for untrusted roles can cause security risks.

Features

The Ajax Dialog Filter module ensures that any <a> tag inside a text‑formatted field that includes the use-ajax class automatically receives the required Drupal AJAX dialog libraries. This allows editors to create modal or off‑canvas AJAX dialogs directly from formatted text without writing custom code or attaching libraries manually.

What it does:

  • Detects class="use-ajax" class inside <a href="/node/123" class="use-ajax" data-dialog-type="modal">Open AJAX Modal</a> via text formats
  • Automatically attaches core/drupal.ajax, core/drupal.dialog.ajax, and related libraries
  • Ensures AJAX dialogs work reliably even when triggered from CKEditor or other formatted text sources

Why use it:

  • Ideal for sites that use modal dialogs for help text, embedded forms, or interactive UI elements
  • Removes the need for custom preprocess hooks or theme overrides
  • Ensures consistent behavior across all text formats and content types

Use cases:

  • Opening modal forms from body text
  • Triggering AJAX dialogs from CKEditor content
  • Creating interactive help links or inline modal content
  • Enabling editors to add AJAX dialogs without developer intervention

Post-Installation

After installing the module:

  1. Go to Configuration → Content authoring → Text formats and editors
  2. Edit the text format you want to support (e.g., Basic HTML)
  3. Enable AJAX dialog library loader in the filter list
  4. Place it near the bottom of the filter order

No additional configuration pages or content types are added. Once enabled, the filter automatically scans rendered text and attaches the required libraries whenever it finds a link with the use-ajax class.

Additional Requirements

This module has no additional requirements beyond Drupal core. It relies on the AJAX and dialog libraries already included in Drupal.

Activity

Total releases
2
First release
Jun 2026
Latest release
19 hours ago
Release cadence
0 days
Stability
0% stable

Releases

Version Type Release date
1.0.0-alpha1 Pre-release Jun 23, 2026
1.x-dev Dev Jun 23, 2026