Closed (duplicate)
Project:
D7 Media
Version:
7.x-2.x-dev
Component:
WYSIWYG integration
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Jan 2012 at 12:20 UTC
Updated:
29 Jun 2012 at 08:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
adamgerthel commentedUpdated issue title to better reflect issue. It works using images.
Comment #1.0
adamgerthel commentedadded more info
Comment #2
Marc-Antoine commentedThat is because the Wysiwyg isn't meant (yet) to insert media types other than image, I've read in other subjects that it was hard coded that way (will try to find the source)
The bug here is that the wysiwyg still shows the other media types, as described in
Respect file type restrictions in media browser library view
and
'Allowed file types' rubric in wysiwyg upload interface is wrong
finally, i'll mark this bug a duplicate, because if you want more than one type of media to be added using the wysiwyg, this issue already exists:
Expose the media types allowed for WYSIWYG variable in the UI
Comment #3
drzraf commentedI tried to inline a PDF file as a simple link, using the default full view mode of the application file type (used for PDF).
In the format form the submit button is indeed buggy because
imgElementis empty.However, the markup (
formattedMedia) is like :<span class="file"><img class="file-icon" alt="" title="application/pdf" src="/modules/file/icons/application-pdf.png" /> <a href="URL" type="application/pdf; length=SIZE"> FILENAME </a></span>That's what I would expect to see into the wysiwyg area (using tinymce).
The problem here is that
var imgElement = $(this.stripDivs(formattedMedia));fails miserably (or works as intended). I'm left with a simple PDF file icon.Obvious fix : remove the workaround for ckeditor : 1412460-3-p1.patch
Then comes a second problem :
Activate the link file format to the application file type (renders the plain text file URL) => the format form is unable to bring anything to the textarea again.
fix : test for markup; if there isn't then use the text (in a span) : 1412460-3-p2.patch (above patch implied).
I still don't see why such kind of patches would have to wait for #1016376: Expose the media types allowed for WYSIWYG variable in the UI, #1037234: 'Allowed file types' rubric in wysiwyg upload interface is wrong or #1293908: Respect file type restrictions in media browser library view.
Comment #4
devin carlson commentedAs mentioned in #3, Media's WYSIWYG integration currently only works with images. This limitation is currently being discussed at #1283844: [meta] Improve WYSIWYG integration and is being worked on in #1451316: Clean up wysiwyg-media.js.
Comment #4.0
devin carlson commentedFixed a typo
Comment #5
loopy1492 commentedSwitching to an earlier version of jQuery in my Administration theme did the trick. I switched to 1.7. YMMV.
/admin/config/development/jquery_update