Problem/Motivation
Currently, our JS plugin identifies drupalentity widgets with divs containing data-entity-type
and one of data-entity-id
and data-entity-uuid
attributes. This approach worked fine unless Core started using the same attributes for image usage tracking in #2350327: editor.module should use the same data- attributes as entity_embed.module uses. And as a result, now the image plugin treats inserted images too as drupalentity. To fix this, we need to use the same approach used by the entity embed filter i.e. apart from these two attributes, one of data-view-mode
or data-entity-display
must also be present.
Proposed resolution
JS plugin must ensure that one of data-view-mode
or data-entity-display
attributes must also be present for an element to be a drupalentity widget.
Remaining tasks
- Patch
- Review
User interface changes
- Images are now NOT interpreted as drupalentity widgets
API changes
None
Comments
Comment #1
root_brute CreditAttribution: root_brute commentedPull request
https://github.com/drupal-media/entity_embed/pull/134
Comment #2
cs_shadow CreditAttribution: cs_shadow commentedMerged!