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.

Comments

devin carlson’s picture

Status: Active » Needs review
StatusFileSize
new869 bytes

A patch to remove the wrapping <div></div>.

ParisLiakos’s picture

Status: Needs review » Needs work

Yeah..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

ParisLiakos’s picture

Status: Needs work » Fixed

thats what i commited
http://drupalcode.org/project/media.git/commit/04a43b5
i think it makes sense

Status: Fixed » Closed (fixed)

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