Fckeditor is something that I’ve used for home and work often. It is a lightweight, very adaptable open-source wysiwyg editor. The editor can be used with most major web languages (php, js, coldfusion, etc..).
Recently I ran into a problem that I have not seen before (and this could be due to the complexity of the site I was working on, being too complex for its own good:)).
I had an existing site built mainly in PHP, and wanted to add the ability for the site’s owner to edit the pages using Fckeditor.
After uploading the Fckeditor, the _samples directory had mostly working PHP examples. However, each time I would edit a file, the html and head section would just disappear.
Hitting the “source” button on Fckeditor, revealed that it did not see theor other sections of my code.
After quite a bit of googling, I discovered that I needed to enable full page edits with this fckconfig.js addtion:
FCKConfig.FullPage = true;
In addtion, since some of the files had php code in them, I needed to add:
FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code
While I can understand Fckeditor “hiding” html head sections and things like server-side php code, given that it is supposed to be a wysiwyg editor for non-programmers, the major problem is that is LOSES that data.
Fine, if you want to, by default, hide much of the source code of a file, at least do not lose it upon post.