Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
See #1932898-7: Wysiwyg + Media module support, for this to work media should allow the following attributes: data-picture-group, data-picture-align
But maybe it's even better to allow all data- attributes?
Commit credits should go to Shaun Dychko
Comment | File | Size | Author |
---|---|---|---|
media-custom-attributes-1932898-7.patch | 909 bytes | attiks | |
Comments
Comment #1
attiks CreditAttribution: attiks commentedComment #2
ParisLiakos CreditAttribution: ParisLiakos commentedi think we should allow all data attributes..i am not sure though that data-* would just work or we need to change stuff in the js side
Comment #3
elliotttf CreditAttribution: elliotttf commentedThis patch works for the functionality it was introduced for. data-* probably makes sense too but for now marking this as RTBC.
Comment #4
aaron CreditAttribution: aaron commentedI've committed this as it stands. I think that we'll probably get into a can of worms if we have to parse each of the allowed attributes in javascript, but I'll let better minds than mine dwell on the issue.
Comment #6
Chris Burge CreditAttribution: Chris Burge commentedPicture has added another attribute - 'data-picture-mapping' - in its 7.x-2.x branch. As a result, we have the same issue with this new attribute as was addressed here for 'data-picture-group' and 'data-picture-align'. I have created a new issue: #2289321: Add 'data-picture-mapping' Attribute to 'wysiwyg_allowed_attributes' to Support Picture Integration
Comment #7
Chris Burge CreditAttribution: Chris Burge commentedThe 'WYSIWYG integration' component for this project has been removed. Changing to 'Media WYSIWYG'.