Is it possible to integrate the media module somehow so one could select/upload images

Comments

ufku’s picture

If media interface can be loaded by javascript then it is possible to integrate it into BUE interface with a js button.

ufku’s picture

Status: Active » Closed (fixed)
Jarode’s picture

Status: Closed (fixed) » Active

You are right but how doing that stuff ? That's the issue...

darksnow’s picture

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

darksnow’s picture

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

darksnow’s picture

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

Paracetamol’s picture

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