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.
The file_entity module now support image field formatters for displays. When an image is inserted into a wysiwyg field with the Media module, a user can override file properties such as the alt, title, width and height. The file_entity module saves these variables into the $variables['item] array. The colorbox theme function can pick up these overrides and use them in its theme function.
Comment | File | Size | Author |
---|---|---|---|
#1 | colorbox-allow-overrides-2169461-1.patch | 880 bytes | idebr |
Comments
Comment #1
idebr CreditAttribution: idebr commentedTo test this feature:
- install latest media 2.x-dev with patch #19 from #2126755
- install latest wysiwyg 2.x-dev
- install latest ckeditor
- apply the attached patch
Comment #2
TwoDThe Media Wysiwyg patch in #2126755: Improve Media's WYSIWYG Macro handling has been committed now. I'm using this with a few other patches to improve macro handling in Media Wysiwyg, but since I'm also using Colorbox for some of the rendered images, much of what I need done (floating images left/right is a big issue) isn't possible without this patch as Colorbox currently ignores the style attributes.
Comment #3
frjo CreditAttribution: frjo commented