Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293938

Provide option to display contextual links on embedded entities

$
0
0

Problem/Motivation

The Media Embed filter plugin currently removes contextual links from embedded media. The code mentions:

// - Contextual Links do not make sense for embedded entities; we only allow
//   the host entity to be contextually managed.

However, I think the ability to contextually manage items is exactly why I'd rather embed media than insert an image directly in my content. For example, I could have an "Attribution" field on an image bundle, and want to provide users the ability to edit that attribution wherever that image appears. Same idea with some image style implementations that use cropping, if you are editing content, and see a weird crop in an embedded image, it's a much better UX to edit the image in place, than to click over to the media library, brainstorm what title search might correspond to this image, page thru results...

Proposed resolution

Add a checkbox to the settings form for the Media Embed filter that allows users to opt in to contextual links on embedded media.

Remaining tasks

  1. Add the feature
  2. Write tests?

User interface changes

New option on Media Embed filter settings form, defaulting to current behavior.

API changes

NA

Data model changes

Add new field to filter_settings.media_embed
File: core/modules/media/config/schema/media.schema.yml

    show_contextual_links:
      type: boolean
      label: 'Show contextual links on embedded media to users with appropriate permissions if contextual module is enabled.'

Viewing all articles
Browse latest Browse all 293938

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>