Hello RoundCube Devs, I'm a TinyMCE plugin developer and have modified RoundCube to make it possible for developers like myself to extend the functionality of TinyMCE through your plugin API.
The main thing TinyMCE plugin developers need, is access to the properties passed to TinyMCE.init(). What I've done is modified editor.js to do an rcmail.triggerEvent('tinymce_init', event). The event object contains a member called options with the TinyMCE options. There are other members too for the arguments to the rcmail_editor_init function.
To make this work properly, it's important that plugins get a chance to load and register their listener before rcmail_editor_init is called. As such, I've also modified main.inc to call rcmail_editor_init at the bottom of the JS (using the 'foot' priority).
To apply the patch:
roundcube/$ patch -p0 tinymce_plugin_api.diff
And to demonstrate this patch, I've created a plugin for After the Deadline. After the Deadline is a software service that checks spelling, style, and grammar in TinyMCE. The plugin is available at http://www.afterthedeadline.com/download.slp?platform=RoundCube you can learn more about After the Deadline at http://www.afterthedeadline.com/features.slp
-- Raphael
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/N6/ukdpVJJX/tinymce_plugin_api.diff Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/