Using any software you come across things that dont seem to work quite right.
Here are some things i have changed in my version of MangoBlog to make things better.
Code Coloring
I implements the Code Coloring by EmpireGP colorise plugin which seems to be working well. I did come across an issue though when putting in ColdFusion tags. When you entered them in the first time and submited the post the code stayed in tact. When you went to edit a post that had code in it, the TimyMC editor decided to try and convert my ColdFusion tags into HTML tags and ended up being rejected and striped out. Them meant my tags in my code were no longer there.
I implements this fix to overcome this problem.
In the TinyMC editorSettings.cfm file i added this JavaScript function into the script block
function onLoadContent() {
var c = this.getElement().value
var reg = /(<)(\/?cf[^>]*)(>)/g;
c = c.replace(reg, "<$2>")
this.setContent(c);
}
and then added a "setup" property to the tinyMCE.init() method on the same page
setup : function(ed) {
ed.onLoadContent.add(onLoadContent)
}
In essence what i am doing it converting all of the ColdFusion tags back into normal text by converting the < and > symbols back into < and > charaters so the HTML editor can render them properly.