While working on the port of the Entity Embed filter's test coverage to core in #2940029: Add an input filter to display embedded Media entities, I realized that instead of the fairly complicated logic that #3063801: Only attach `entity_embed/caption` asset library when an entity was actually rendered added, we could just use #attached.

CommentFileSizeAuthor
#2 3063824-2.patch1.77 KBwim leers

Comments

Wim Leers created an issue. See original summary.

wim leers’s picture

Status: Active » Needs review
StatusFileSize
new1.77 KB
oknate’s picture

RTBC.

Note, the library is always added even when there isn't a caption. But it's one css rule currently and doesn't break anything. Also, this was true before.

There isn't much value is checking for the availability of the caption since the one css rule doesn't break anything.

oknate’s picture

Status: Needs review » Reviewed & tested by the community
wim leers’s picture

Correct. By the way, attaching it only when there is a caption is impossible, because a filter is not informed which other filters are enabled for a given text format.

wim leers’s picture

Issue tags: +Media Initiative

  • Wim Leers committed 9533aea on 8.x-1.x
    Issue #3063824 by Wim Leers, oknate: Instead of conditionally attaching...
wim leers’s picture

Status: Reviewed & tested by the community » Fixed

🚢

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.