I’m personally very satisfied with CKEditor 3.0, it became a very polished version of FCKEditor with a new API, but there is one heavy downside of it all: it isn’t documented. When I installed CKEditor on a site, it was all good until I noticed that the file upload is missing and there is no way to configure it server side like there was in FCKEDitor, so I googled and found this: http://docs.cksource.com/CKEditor_3.x/Developers_Guide/File_Browser_(Uploader), this link was good because I realized that I need to write the file upload server side component myself, unless of course I want to use CKFinder, which I think has way too many features.
Writing my own upload PHP script isn’t all that bad, since I can do things that CKEditor/CKFinder wouldn’t do otherwise, like image resize. After actually writing the script I realized that it works, but it doesn’t pass the dialog the link. I noticed, that my server side JavaScripts actually get parsed, so I figured, why not write this simple feature myself. After 1-2 hours of finding out how the whole CKEditor plugin/dialog system works I found out that for some reason the script I generate server side doesn’t see my global variables in the document, not even, if I use the window object, so I figured, this could mean only one thing: this whole thing runs in an IFrame, but not only that, there is a strange way that this should work, basically instead of the AJAX style it uses IFrames and JavaScript callbacks .
After realizing all this, I finally found the proper solution here, which looks like this(if of course we are using PHP server side):
<script type="text/javascript"> window.parent.CKEDITOR.tools.callFunction( <?php echo $_GET['CKEditorFuncNum']?>, '<?php echo "$uploaded_file_url"?>' ); </script> This is what is needed to be generated server side for the upload dialog to function correctly, absolutely not a simple concept but only needed here.
Posted by djdarkman 
