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.
Is it possible to integrate the media module somehow so one could select/upload images
Comments
Comment #1
ufku CreditAttribution: ufku commentedIf media interface can be loaded by javascript then it is possible to integrate it into BUE interface with a js button.
Comment #2
ufku CreditAttribution: ufku commentedComment #3
Jarode CreditAttribution: Jarode commentedYou are right but how doing that stuff ? That's the issue...
Comment #4
darksnow CreditAttribution: darksnow commentedI have this working on my site.
It's not tested with IE as yet, and it's a bit hacky since the JavaScript is currently included in my custom theme rather than a separate module, but it works on Firefox, Chrome and Opera.
I'll create a proper module for it soon and let everyone know.
One quick question, perhaps off topic for this thread, is there a way to rewrite the image button, or add a new custom button, from the install procedure of another module? I didn't see anything in my admittedly cursory look over the BUEditor code.
Thanks.
Comment #5
darksnow CreditAttribution: darksnow commentedThat was a lot easier than I had expected.
I've created a sandbox module for this.
http://drupal.org/sandbox/darksnow/1877606
Once I've confirmed the JavaScript works in IE7 and above I'll apply for full module status, unless the BUEditor project, or media, want to include the code as a sub module.
Have a play and let me know what you think.
Comment #6
darksnow CreditAttribution: darksnow commentedThis sandbox module of mine seems too small to create a full project so I think the best approach is to include it with the BUEditor module as a sub module. This would give user of BUEditor the option to activate the media integration module and follow the manual step of creating a button for it where ever it's required.
This has now been tested in IE7 and updated to work out media attributes differently so I think it's ready for people to have a look as see if they want it.
If anyone has any ideas on how best to get this out there, let me know.
Comment #7
Stolzenhain CreditAttribution: Stolzenhain commentedJust tested your sandbox module – this is awesome and should really be comitted to the main branch as it makes using the BUEditor (and therefore Markdown) much more accessible to end users.