Add a way to make media captions not editable in CKEditor

Created on 3 June 2021, over 3 years ago
Updated 8 January 2024, about 1 year ago

Problem/Motivation

modules/media/js/plugins/drupalmedia/plugin.js automatically turns the media caption editable in CKE.
But in our case we don't want that because we don't want to allow users to provide an embed-specific caption (and if they enter one, it will not be used in front-office).

Steps to reproduce

  1. Create a CKE field with the "Insert a media" button and filter.
  2. Create a media with a caption (it must have a figcaption HTML tag in its template.
  3. Insert this media in the CKE field.
  4. The caption is editable.

Proposed resolution

There should be a setting in the text format to disable this behaviour.

Remaining tasks

JS is not my forte but I can try to submit a patch.

Feature request
Status

Needs work

Version

11.0 🔥

Component
Media 

Last updated 3 days ago

Created by

🇫🇷France prudloff Lille

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024