MangoBlog Plugin: TinyMCE Manager

This started out as me trying to sort out the code display, which incidently, I still haven't managed to do and ended up as a plugin to help manage TinyMCE settings.

I've been tweaking and messing with the layout.cfm file trying to sort out how to get the code panels working properly without having mess about with switching off javascript and tinymce and so on.

I get kinda grumpy when I start messing with core files, so I decided I should really work out how to make the changes more flexible and easier to fix when updates to MangoBlog are released.

This is by no means a silver bullet.  If the admin/layout.cfm file is changed it will be necessary to remake the layout.cfm file for the plugin. Hopefully someone will find it useful 

What I've done is taken a copy of the standard layout.cfm file and pulled out the plugin, button bars and extended valid element setting sections.  These I've replaced them with 3 admin events that are associated with the a  matching set of preferences.  I've also added in an admin event and preference so that you can add any additional config that you might need for specialist plugins.  For instance this could be used for the plugin_asffileexplorer_browseurl and plugin_asffileexplorer_assetsUrl settings.

That's about it really.

Couple of things to know:
The settings page is kinda ropey, as I haven't really looked into the CSS side things properly. If anyone fancies tidyig it up..... :D
When you activate the plugin it will take a copy of your existing layout.cfm file and replace it with one from the plugin with the admin events in it.

You can download the plugin here

Please have a play with it, let me know of any enhancements you'd like to see and problems you find. And please for love of all that's good someone sort out my shocking CSS in the settings form! ;)

Phase 2 : sort out a plugin to implement SyntaxHighlighter with the ColdFusion brush and the syntaxhl tinymce plugin.

Hi Stephen,
Very nice, I'll check it out :)
By the way, would it help if the settings for whatever editor of choice you are using (hopefully that will be an option in the future) were in a different file instead of layout.cfm?
# Posted By Laura | 9/12/08 5:23 AM
I was working with Laura on some changes I made to my install to allow me to turn TinyMCE off and on with a click of a link (and this would remember my choice during the browser session). The problem was my changes needed some adjustment to be sure to work with any admin plugins, so I was supposed to make some (I think) easy changes before Laura could incorporate them. I just haven't gotten around to doing that...maybe I should.
# Posted By Brian Rinaldi | 9/12/08 1:42 PM
@Laura, I was just thinking about this separation of the editor from the layout.cfm.

I think its definitely worth doing. The editors could then become plugins, so you could activate the editor plugin of your choice.

@Brian, I kinda decided against that route, because every time I forgot to switch tinymce for a post with code in it I'd end up trashing the code and it just made me grumpy. The Syntaxhl,SyntaxHighlighter with CF brush seems to be a much neater solution than to use the <code></code> tags and switching off tinyMCE when you want to put code in a blog entry. Just my thoughts/feelings....
# Posted By Stephen Moretti | 9/12/08 2:30 PM
Hi Stephen,
Yeah, I think I'll do that then.
That being said, editors can already be plugins, since the admin already has a header event that plugins can use to output whatever code they want in the <header>. The problem is that TinyMCE is kind of hardcoded in the admin files. Ideally, that should become a plugin completely abstracted from there, and the editor preferences would be set when the plugin is called to display things in the header, and no extra file would be needed.
# Posted By Laura | 9/12/08 7:43 PM
Has anyone tested this with mango 1.3.1? Wondering if it still works.
# Posted By Mark Aplet | 3/26/09 11:53 PM