OK, like I promised, here are the changes I had to make to the file fckconfig.js in order to get the editor to quit converting it's contents to XHTML and
completely screwing up the code snippets.
In the file previously mentioned, fckconfig.js, there are 2 primary settings that need to be changed or, like I said, when you use the <code>...</code> blocks to put code snippets in the blog it will break them. They are:
- FCKConfig.EnableXHTML = true ;
- FCKConfig.EnableSourceXHTML = true ;
Change these to (obviously):
- FCKConfig.EnableXHTML = false ;
- FCKConfig.EnableSourceXHTML = false ;
It's a handy feature, for sure... if all you're ever putting in the editor is HTML for it to convert. However, it was doing things like converting
<cfif thisVar NOT thatVar>
<cfset someFunction()>
</cfif>
to
<cfif not="" thisVar="" thatVar="">
<cfset>someFunction()</cfset>
</cfif>
...NOT good.
But, if you set those values from the beginning of the entry to false, you should be fine. If NOT, there's another pair that I edited as well... just because I shut them off in testing and it didnt' seem necessary to turn them back on:
- FCKConfig.FormatSource = true ;
- FCKConfig.FormatOutput = true ;
I could turn them back on, but it's working now and I don't see the need. If any of you decide to try this, let me know how it works out!!
Laterz!
Where do you extract fckeditor? Under the site root or the /blog folder?
Thanks,
Brian
Well, it appears that those variables are deprecated in the latest version of FCKEditor. Grrr. Anyone know of a way to do the same thing in the 2.3 version?