tiny mce media plugin
rodrigoaguilera - December 23, 2008 - 11:45
| Project: | Wysiwyg |
| Version: | 6.x-1.0 |
| Component: | Editor - TinyMCE |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
Description
The flash plugin in tinyMCE is deprecated
http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/flash
should use
http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media
I'd added to the plugin array in \modules\wysiwyg\editors\tinymce.inc this way
'media' => array(
'path' => $editor['library path'] .'/plugins/media',
'buttons' => array('media' => t('Media')),
'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
'internal' => TRUE,
'load' => TRUE,
),

#1
This needs further work, which is discussed and worked on here: #328252: Handle compatibility of internal plugins via plugin API (since I want to solve this in a generic way, i.e. once for all editors and versions)
#2
I'll confirm this works (media plugin gets added)!!!
Can anyone get the Drupal teaser break and Spellchecker working for 6.x?
#3
Okay so I did some experimentation and FIGURED IT OUT!
Here's how you enable SPELLCHECKER:
http://drupal.org/node/343184#comment-1149301
Make sure you use my latest plugin version to get it working.
Here's how you enable Drupal teaser and page breaks:
Add this to tinymce.inc:
'drupalbreak' => array('path' => $editor['library path'] .'/plugins/drupalbreak',
'buttons' => array('drupalbreak' => t('Drupal teaser break'), 'drupalpagebreak' => t('Drupal page break')),
'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/drupalbreak',
'internal' => TRUE,
'load' => TRUE,
),
Make sure you use this updated Drupalbreak plugin posted in the next comment.
#4
Here's the working Drupalbreak plugin. I also attached the working Spellchecker as well for your convenience.
#5
i have put the code in #3 in the end of tinymce.inc:
'table' => array('path' => $editor['library path'] .'/plugins/table',
'buttons' => array('tablecontrols' => t('Table')),
'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table',
'internal' => TRUE,
'load' => TRUE,
),
);
if ($editor['installed version'] > 3) {
$plugins['safari'] = array(
'path' => $editor['library path'] .'/plugins/safari',
'extensions' => array('safari' => t('Safari compatibility')),
'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari',
'internal' => TRUE,
'load' => TRUE,
);
}
return $plugins;
}
'drupalbreak' => array(
'path' => $editor['library path'] .'/plugins/drupalbreak',
'buttons' => array('drupalbreak' => t('Drupal teaser break'), 'drupalpagebreak' => t('Drupal page break')),
'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/drupalbreak',
'internal' => TRUE,
'load' => TRUE,
),
and get the following error
Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/aaaa/public_html/bb/modules/wysiwyg/editors/tinymce.inc on line 526any help pls?
#6
It should look like this
'table' => array('path' => $editor['library path'] .'/plugins/table',
'buttons' => array('tablecontrols' => t('Table')),
'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table',
'internal' => TRUE,
'load' => TRUE,
),
'drupalbreak' => array(
'path' => $editor['library path'] .'/plugins/drupalbreak',
'buttons' => array('drupalbreak' => t('Drupal teaser break'), 'drupalpagebreak' => t('Drupal page break')),
'internal' => TRUE,
'load' => TRUE,
),
);
if ($editor['installed version'] > 3) {
$plugins['safari'] = array(
'path' => $editor['library path'] .'/plugins/safari',
'extensions' => array('safari' => t('Safari compatibility')),
'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari',
'internal' => TRUE,
'load' => TRUE,
);
}
return $plugins;
}
You were putting the plugin registration code after it was calling the plugins variable.
#7
Seemed easy. I've done it with the media plugin and it worked. but not this time. After adding the button, TinyMCE did not show up at all. When I unchecked the button (Drupal Break) TinyMCE came back again...any thoughts?
#8
Just to let people know - I've created Wysiwyg SpellCheck module that enables TinyMCE spellchecker plugin. It may be just what you need, until there is a better approach to Wysiwyg plugins.
#9
That worked so smoothly, thanks rodrigo