Tested the feature request with the steps mentioned in Issue summary.
Applied...

Contribution Date
Technology
Contribution Project
Contribution Details

Tested the feature request with the steps mentioned in Issue summary.
Applied the Patch provided #3
Tested on v9.4.x-dev
- Patch successfully applied
- Checkbox provided to enable disable the the Caption

The JS still needs some work, the entire caption field freezes

Code Review.
editor.config.DrupalMediaLibrary_enableCaptioning Not defined.
This needs to be set and passed in getConfig

/** * {@inheritdoc} */ public function getConfig(Editor $editor) { if ($editor->hasAssociatedFilterFormat()) { $filters = $editor->getFilterFormat()->filters(); if ($filters->has('media_embed')) { $filter_caption = $filters->get('media_embed')->settings->enable_captioning; } } return [ 'drupalMedia_previewCsrfToken' => \Drupal::csrfToken()->get('X-Drupal-MediaPreview-CSRF-Token'), 'DrupalMediaLibrary_enableCaptioning' => $filter_caption ?? 0, ]; }

media schema needs to be updated

enable_captioning: type: boolean label: 'Enable captioning'
Contribution Author
Files count
0
Patches count
0