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.
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.
Comment | File | Size | Author |
---|---|---|---|
#28 | media-ckeditor-browser-configs-1434118.28.patch | 556 bytes | dafeder |
#17 | media-wysiwyg-browser-configs-1434118.17.patch | 3.05 KB | mrfelton |
#9 | media-wysiwyg-browser-configs-1434118-4.patch | 3.09 KB | valor |
#4 | media-wysiwyg-browser-configs-1434118-4.patch | 5.54 KB | valor |
Comments
Comment #1
dddave CreditAttribution: dddave commentedThis might enhance your chances of a response. ;) Do you still need one btw?
Comment #2
trillex CreditAttribution: trillex commentedOh, my bad. :)
Yeah, project is on a stand still but it would be neat to have, thank you. :)
Comment #3
Equ CreditAttribution: Equ commentedSubscribing. 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!
Comment #4
valor CreditAttribution: valor commentedThe 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.
Comment #5
valor CreditAttribution: valor commentedComment #6
mrfelton CreditAttribution: mrfelton commentedPatch 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.
Comment #7
mrfelton CreditAttribution: mrfelton commentedAlso, I get nothing showing up under Enabled browser plugins in WYSIWYG at /admin/config/media/browser
Comment #8
valor CreditAttribution: valor commentedThe 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
Comment #9
valor CreditAttribution: valor commentedReproduced against latest dev version (7.x-2.0-unstable3+46-dev)
Comment #10
Equ CreditAttribution: Equ commentedThe provided patch works for me (applied against 7.x-2.0-unstable3+47-dev).
Comment #11
Dave ReidComment #12
Equ CreditAttribution: Equ commentedThe last message seems to be empty...
Comment #13
RobW CreditAttribution: RobW commentedTesting this and works great so far. Thanks Valor.
+1 RTBC.
Comment #14
aaron CreditAttribution: aaron commentedConsidering 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.
Comment #15
aaron CreditAttribution: aaron commentedAdditionally, if you do not select any checkboxes, you get an error message: Error message
Enabled browser plugins in WYSIWYG field is required.
Comment #16
RobW CreditAttribution: RobW commentedProbably out of scope of this particular issue/patch, but some other config that would be nice to set in this UI:
Comment #17
mrfelton CreditAttribution: mrfelton commentedHere is an updated patch that fixes the issues described in #14 and #15.
Comment #18
tsvenson CreditAttribution: tsvenson commentedHow 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?
Comment #19
John Pitcairn CreditAttribution: John Pitcairn commentedPatch 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...
Comment #20
mrfelton CreditAttribution: mrfelton commentedI'm not convinced about a per text area configuration, but per wysiwyg profile might be nice.
Comment #21
tsvenson CreditAttribution: tsvenson commented@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.
Comment #22
yashadev CreditAttribution: yashadev commentedApplied, and works as it should. Thanks
Comment #23
mpgeek CreditAttribution: mpgeek commentedA friendly confirmation that the patch in #17 applies cleanly and works as designed.
Comment #24
dafederHas anyone had any luck getting this same behavior in the ckeditor module (as opposed to wysiwg)?
Comment #25
mpgeek CreditAttribution: mpgeek commented@dafeder, it should work if you use WYSIWYG with the CKEditor (or any other) library.
Comment #26
xcafebabe CreditAttribution: xcafebabe commentedThanks @mrfelton!!! #17 It works as expected . The community rocks!!!
Comment #27
dafeder@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.
Comment #28
dafederI 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.
Comment #30
dafederHolding 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
Comment #31
mpgeek CreditAttribution: mpgeek commentedPatch at #17 needs review. Patch at #28 is a separate issue.
Comment #32
Devin Carlson CreditAttribution: Devin Carlson commentedThe patch in #17 applied cleanly and allowed me to select which tabs were shown in the media browser.
Comment #33
mrfelton CreditAttribution: mrfelton commentedOk, 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.
Comment #34
aaron CreditAttribution: aaron commentedI have just committed this: http://drupalcode.org/project/media.git/commit/cd40b7b. Things for all the great work everyone!
Comment #35.0
(not verified) CreditAttribution: commentedAdded about quick hack