Media Button in WYSIWYG Module

We’re implementing the new WYSIWYG Module in Drupal 6, and really digging it.  We are using it with our WYSIWYG Editor of choice: TinyMCE (3.2.1.1).

We noticed, however, as we were setting up the module in Drupal, that our beloved media button was gone. Here’s how we got it back in there:

First, you need to install and setup the module & tinyMCE as detailed in the readme file.  Next, open ‘…moduleswysiwygeditorstinymce.inc’

All you have to do is add a few lines of code (around line 472):

‘layer’ => array(
‘path’ => $editor[‘library path’] .’/plugins/layer’,
‘buttons’ => array(‘insertlayer’ => t(‘Insert layer’), ‘moveforward’ => t(‘Move forward’), ‘movebackward’ => t(‘Move backward’), ‘absolute’ => t(‘Absolute’)),
‘url’ => ‘http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer’,
‘internal’ => TRUE,
‘load’ => TRUE,
),

/*Begin Inserted Lines*/

‘media’ => array(
‘path’ => $editor[‘library path’] .’/plugins/meda’,
‘buttons’ => array(‘media’ => t(‘Insert Media’)),
‘url’ => ‘http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media’,
‘internal’ => TRUE,
‘load’ => TRUE,
),

/*End Inserted Lines*/

‘paste’ => array(
‘path’ => $editor[‘library path’] .’/plugins/paste’,
‘buttons’ => array(‘pastetext’ => t(‘Paste text’), ‘pasteword’ => t(‘Paste from Word’), ‘selectall’ => t(‘Select all’)),
‘url’ => ‘http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste’,
‘internal’ => TRUE,
‘load’ => TRUE,
),

Now the media button will be available to be selected as an option from your TinyMCE administrator page within drupal.