On one of my latest Drupal websites there are multiple bloggers, none of whom are particularly tech savvy. I set up the CMS with TinyMCE because I like how they can drag and drop images around (I just wish Drupal had an image embed uploader like WordPress!). After a while they complained that the Insert Flash button in TinyMCE just wasn’t cutting it. So I set about fixing it. How hard could it be to make a plugin that just inserts some HTML code where your cursor is? Like it already does for images?
It turns out it is very easy. I was able to just edit the TinyMCE “Example” plug-in, which already did basically exactly what I wanted. So here I provide it to you, Internet. I hope it is useful, and please let me know if it’s broken (or could work better). Thanks!
UPDATED: (9-17-2010) I fixed some bugs with IE. It should work better cross-browse now.
Download the plugin:
To use this plugin, install it in the TinyMCE plugin folder and just include it in the TinyMCE.init() call like you would the other plugins. Example (“embed” is the name of the plugin):