Hi all,
I recently installed FCKEditor and configured the upload settings as specified in the documentation, and it worked fine in my PHP back-end. Then, I wrote a JavaScript to add an Editor to a page, using the createHtml() method, which also worked fine. However, the "Image Upload" functionality does not work with the JavaScript version. (It works perfectly when I run the PHP Version). Also, I found out that the supplied SAMPLE JAVASCRIPT files works well. I couldn't find any bug in the JavaScript code which I have written, so I will post it here for your consideration :
I am using PHP 5, and the FCKEditor is in ..../htdocs/fck/fckeditor directory.
All the upload settings are set and working with PHP.
<html> .... <script type="text/javascript" src="http://localhost/fck/fckeditor/fckeditor.js"></script> <script type="text/javascript"> window.onload = function() { var div = document.getElementById("editor"); var fck = new FCKeditor("fck"); fck.BasePath = "fckeditor/"; div.innerHTML = fck.CreateHtml() }; </script> ... </html>