Posted by trillex on February 9, 2012 at 1:38pm
27 followers
| Project: | Media |
| Version: | 7.x-2.x-dev |
| Component: | WYSIWYG integration |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | Media Initiative, sprint |
Issue Summary
Hi,
I have a content type, where I have added a media field for youtube videos (and nothing else, thanks to the 2.0 way of selecting which tabs to show in the media browser) but I'd like to be able to disable Youtube/web linking in the Media Browser found in WYSIWYG/TinyMCE - much like the one for content types. Is this at all possible?
I'll even be happy for a quick hack.
Comments
#1
This might enhance your chances of a response. ;) Do you still need one btw?
#2
Oh, my bad. :)
Yeah, project is on a stand still but it would be neat to have, thank you. :)
#3
Subscribing. I also need a separate config for WYSIWYG. Right now in WYSIWYG's media browser there are at least 3 tabs: Upload, Library, View Library + any other custom views. I'd like to be able to chose which view (i.e. "Enabled browser plugins") to display in WYSIWYG's media browser.
Thanks!
#4
The following patch patches Media's wysiwyg to add a separate configuration settings in admin/config/media/browser that enables turning on/off browsers plugins in wysiwyg media plugin.
#5
#6
Patch results in the following error when trying to visit admin/config/content/wysiwyg/profile/wysiwyg_filter/edit
Did you mean to remove that function? I get this even after clearing the cache, and the registry.
#7
Also, I get nothing showing up under Enabled browser plugins in WYSIWYG at /admin/config/media/browser
#8
The patch was applied to an older dev version of Media, I will attach a new patch in a while that targets the latest dev version of Media 2
#9
Reproduced against latest dev version (7.x-2.0-unstable3+46-dev)
#10
The provided patch works for me (applied against 7.x-2.0-unstable3+47-dev).
#11
#12
The last message seems to be empty...
#13
Testing this and works great so far. Thanks Valor.
+1 RTBC.
#14
Considering the "If no plugins are selected, they will all be available" message, I believe that it would be better to default to an empty array. Otherwise, if you have any other tabs available to your system (such as the YouTube tab or the new My Files tab), they will not appear by default.
#15
Additionally, if you do not select any checkboxes, you get an error message: Error message
Enabled browser plugins in WYSIWYG field is required.
#16
Probably out of scope of this particular issue/patch, but some other config that would be nice to set in this UI:
#17
Here is an updated patch that fixes the issues described in #14 and #15.
#18
How did I manage to miss this patch? Just saw it in action in @aaron's Media YouTube demo video.
While being able to configure this global for the whole site is a great improvement, it will be needed to configure this per individual text area as well.
Would it be possible to have a global setting, but then be able to override when a tailored configuration is needed?
#19
Patch at #17 works for me, thanks. I needed to prevent users uploading in the wysiwyg browser to ensure image file paths are honored, and giving users multiple browser view libraries just confuses them...
#20
I'm not convinced about a per text area configuration, but per wysiwyg profile might be nice.
#21
@mrfelton: Wysiwyg profiles added ontop of the text filters and are designed to be reusable in many different places. Thus, the same profile can be used on for example a content type, a taxonomy term page or even a user profile page.
Thus if it was only possible to define for example the storage path for the profile, that would only result in a lot of wysiwyg profiles that has only the media settings differencing.
Then add do that users also have the ability to change what profile they will use on a text area. Thus media for the same content type can then end up in many different storage locations simply due to that it will be very hard to get control over this.
No, this has to be optional for each text area. Otherwise it will be unusable and only create confusion.
#22
Applied, and works as it should. Thanks
#23
A friendly confirmation that the patch in #17 applies cleanly and works as designed.
#24
Has anyone had any luck getting this same behavior in the ckeditor module (as opposed to wysiwg)?
#25
@dafeder, it should work if you use WYSIWYG with the CKEditor (or any other) library.
#26
Thanks @mrfelton!!! #17 It works as expected . The community rocks!!!
#27
@mpgeek - understood, but I was asking about the ckeditor module specifically. It seems like if the media button also works with ckeditor module (which it does), then this should too.
#28
I believe that if this extra condition was implemented in addition to #17, we could handle everything else on the ckeditor side, pulling in the wysiwyg vars.
#29
The last submitted patch, media-ckeditor-browser-configs-1434118.28.patch, failed testing.
#30
Holding off on ckeditor integration until that module's maintainers look into it: #1649464: Allow media-7.x-2.x to configure browser plugins for CKeditor plugin
#31
Patch at #17 needs review. Patch at #28 is a separate issue.
#32
The patch in #17 applied cleanly and allowed me to select which tabs were shown in the media browser.
#33
Ok, thats 6 positive reviews, and tests passing. I reckon commit this so that people can at least configure the browser for WYSIWYG in general, and consider creating a follow up issue to enhance it to a per field configuration option, which would give a lot more flexibility and would be a better long term solution.
#34
I have just committed this: http://drupalcode.org/project/media.git/commit/cd40b7b. Things for all the great work everyone!
#35
Automatically closed -- issue fixed for 2 weeks with no activity.