Is there a way to allow the FCKEDITOR to maintain my Coldfusion code on pages when it opens them to edit the HTML? It seems to leave some simple tags alone, like the cfoutput. But the cfifs get destroyed. Any ideas?
Wed, 01/04/2006 - 10:21
#1
RE: Maintain coldfusion code in editor
RE: Maintain coldfusion code in editor
It's just impossible to write a decent line of code in this forum, or isn't it? Anybody knows how to do it?
Just mail me if you want the correct syntax.
RE: Maintain coldfusion code in editor
I didn't test it, but the line you have to add should look something like this:
FCKConfig.ProtectedSource.Add( /<cf[\s\S]*?<\/cf[\s\S]*?>/gi ) ; // ColdFusion cf tags.
Add this below the other ProtectedSource lines.
Please let me know if this works (with or without modifications), so I can use it myself ;o)
RE: Maintain coldfusion code in editor
1.) Wrap your cfcode in HTML comment tags
2.) Adding the following to the config file
FCKConfig.ProtectedSource.Add( /<cf[\s\S]*?>/gi ) ; // ColdFusion cf tags - OPEN.
FCKConfig.ProtectedSource.Add( /<\/cf[\s\S]*?>/gi ) ; // ColdFusion cf tags - CLOSE.
I also had to upgrade my editor 2.2. I was running an older editor