Drupal is a registered trademark of Dries Buytaert
drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! 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)! linkit 7.0.14 Minor update available for module linkit (7.0.14). migrate_tools 6.1.4 Minor update available for module migrate_tools (6.1.4). diff 2.0.0 Major update available for module diff (2.0.0). masquerade 8.x-2.2 Minor update available for module masquerade (8.x-2.2). video_embed_field 3.1.0 Minor update available for module video_embed_field (3.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). colorbox_inline 2.1.1 Minor update available for module colorbox_inline (2.1.1). node_view_permissions 8.x-1.7 Minor update available for module node_view_permissions (8.x-1.7).

Provides a Drupal text filter that replaces configured links with iframe markup.

What it does

  • Stores link to iframe replacements in a custom database table.
  • Adds a text filter plugin: Replace links with iframes.
  • When enabled on a text format, matching links in processed text are replaced with the configured iframe markup.

Requirements

  • Drupal 10 or 11
  • Core filter module (declared as a dependency)

Installation

  1. Enable the module.
  2. Rebuild caches.

Configuration

  1. Go to: /admin/config/content/links-to-iframes
  2. Add one or more replacements:
    • Link
    • Iframe
  3. Save replacements.

Enable the filter on a text format

  1. Go to: /admin/config/content/formats
  2. Edit the text format you want.
  3. Enable Replace links with iframes.
  4. Save the text format.

Matching behavior

  • Matches anchors by exact href value.
  • Replacement runs only where that text format is applied.

Example input and output

Configured replacement:

  • Link: https://example.com/embed#swap-for-iframe
  • Iframe: <iframe src="https://example.com/embed" frameborder=""></iframe>

Input (text using a format with the filter enabled):

<p>
   <a href="https://example.com/embed#swap-for-iframe">Open embed</a>
</p>

Output after filtering:

<p>
   <iframe src="https://example.com/embed"></iframe>
</p>

Data storage

  • Data is stored in table: links_to_iframes_filter
  • Cache tag used by the filter: links_to_iframes_filter:mappings

Testing

phpunit tests area available in the /tests folder.

Activity

Total releases
3
First release
Mar 2026
Latest release
2 weeks ago
Release cadence
18 days
Stability
0% stable

Release Timeline

Releases

Version Type Release date
1.0.0-beta1 Pre-release Apr 29, 2026
1.0.0-alpha1 Pre-release Mar 25, 2026
1.0.x-dev Dev Mar 25, 2026