Custom Search

Drupal TinyMCE media plugin


Posted on December 17, 2008 by Denis

Send to friendPrinter-friendly version

UPDATE: As a holiday present, I've attached a working tarball of my entire TinyMCE setup below which took me a few months of trial-and-error to perfect. It's powered by TinyMCE 3.1.0.1 and has this media plugin along with many other goodies installed and WORKING flawlessly with ZERO glitches. FF3 is your best bet for non-erratic behavior and proper execution of TinyMCE's JS code. Simply place the tinymce folder under ../sites/all/modules/ and follow TinyMCE module's regular instructions to install. Cheers! (2008-12-17 06:04:51)


Embedding online videos in a blog entry via Drupal may be a bit tricky, especially when the pre-bundled "media" plug-in is not enabled in the original plugin_reg.php file of the TinyMCE module.

At least that was the case for me. So I'm writing this entry to remind myself how I configured the plugin on Drupal's TinyMCE editor. At the time of this post, I am using TinyMCE 6.x-1.x-dev module and TinyMCE 3.1.0.1 on Drupal 6.3.

At first, I didn't know TinyMCE came prebundled with a media plugin so I was searching all over the web for a solution. Then I came across this video link on Technorati that explains how to use the media button. My excitement immediately ended when I realize that the video never explains how the button got there in the first place!

So with more head scratching and trial-and-error, I got it working by inserting this code in the plugin_reg.php (located in the ./modules/tinymce directory).

With the media plugin installed, there's absolutely no need for any other video embed plugin such as the YouTube button which for some reason the TinyMCE Drupal project page advertises instead of the native media plugin!

Here's a demo of the plugin's interface on TinyMCE:

Great post! The link from http://drupal.org/node/295871 is broken. It should be updated to link to this post.

But great!

Should probably submit this as a patch to the TinyMCE module.

Thanks Fredric for pointing this out. That was an old link to this node created before I made a bunch of updates on this site. I made a note of the new link in the Drupal thread.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Pairs of<blockquote> tags will be styled as a block that indicates a quotation.
  • Allowed HTML tags: <a> <b> <blockquote> <cite> <center> <code> <dd> <dl> <dt> <em> <i> <img> <ol> <p> <ul> <li> <strong>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Link to content with [[some text]], where "some text" is the title of existing content or the title of a new piece of content to create. You can also link text to a different title by using [[link to this title|show this text]]. Link to outside URLs with [[http://www.example.com|some text]], or even [[http://www.example.com]].

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
15 + 4 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Creative Commons license icon Creative Commons license icon
This work is licensed under a Attribution Share Alike Creative Commons license