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

CommentFileSizeAuthor
media-custom-attributes-1932898-7.patch909 bytesattiks
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

attiks’s picture

Status: Active » Needs review
ParisLiakos’s picture

i 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

elliotttf’s picture

Status: Needs review » Reviewed & tested by the community

This patch works for the functionality it was introduced for. data-* probably makes sense too but for now marking this as RTBC.

aaron’s picture

Status: Reviewed & tested by the community » Fixed

I'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.

Status: Fixed » Closed (fixed)

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

Chris Burge’s picture

Component: WYSIWYG integration » Code
Issue summary: View changes

Picture 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

Chris Burge’s picture

Component: Code » Media WYSIWYG

The 'WYSIWYG integration' component for this project has been removed. Changing to 'Media WYSIWYG'.