Closed (fixed)
Project:
D7 Media
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
30 Oct 2012 at 15:49 UTC
Updated:
25 Nov 2012 at 04:00 UTC
Jump to comment: Most recent file
Media currently wraps embedded files in a <div></div>. This prevents files from being displayed inline with other content, which is now possible thanks to #1451316: Clean up wysiwyg-media.js and #1792738: Allow custom file view modes for WYSIWYG display.
A common use case for this would be to display a "generic file" somewhere inside of a paragraph of text.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | remove-div-wrapper-from-embedded-files-1827142-1.patch | 869 bytes | devin carlson |
Comments
Comment #1
devin carlson commentedA patch to remove the wrapping
<div></div>.Comment #2
ParisLiakos commentedYeah..about that
To be honest i remove those divs as well in all my projects:P
But a smarter approach here would be:
If file is alone, print it without wrapper divs. (check if field_attach_view() returns something?)
If it has fields, print it in a wrapper div so all of it (file and fields) stays together and add this div a class to allow people target it with css
Comment #3
ParisLiakos commentedthats what i commited
http://drupalcode.org/project/media.git/commit/04a43b5
i think it makes sense