Trigger Drupal.attachBehaviors() when Media is rendered in ckeditor

Created on 12 February 2025, 25 days ago

Problem/Motivation

When rendering media inside ckeditor Drupal.attachBehviors() should be triggered on the media item to initialize any js that may be attached on the media.

I've run into this when embedding remote video players and trying to make them resize properly using fitVids.

Or is there a way I can trigger my own js when a media item is rendered inside ckeditor?

πŸ’¬ Support request
Status

Active

Version

10.4 ✨

Component

media system

Created by

πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

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

Comments & Activities

Production build 0.71.5 2024