So I wanted to try FCKeditor in a website i was redesigning. The first problem i foresaw was that it didn’t have an image resize option. However it seems to be the one closest to meet my requirements, therefore i’m thinking of hacking an image resize utility into the library.
As soon as i copied everything to my project, I got an HTTP Error 404 – Not found. I was like, what the hell just happened there, but then i googled the problem and find the solution. You need to specify the BasePath (the path where your fckeditor script is located) as follows:
<FCKeditorV2:FCKeditor ID=”FCKeditor1″ runat=”server” BasePath=”~/FCKEditor/” ></FCKeditorV2:FCKeditor>
This gets rid of the error.
However if you want to take advantage of the image uploader, you will need to edit fckeditor.js as follows:
var _FileBrowserLanguage = ‘aspx’ ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = ‘aspx’;
This tells the script to use asp.net as the server side language.
You will also need to modify config.ascx (fckeditor/editor/filemanager/connectors/aspx/config.ascx):
In CheckAuthentication, return true!
In SetConfig(), specify where the files which are uploaded are going to go:
UserFilesPath = “~/userfiles/”;
It is also good to have all images/files/media in separate folders but by default this is not true for quick uploads. So do this for File, Image, Flash and Media:
TypeConfig[“File”].QuickUploadPath = “%UserFilesPath%file/”;
TypeConfig[“Image”].QuickUploadPath = “%UserFilesPath%image/”;
TypeConfig[“Flash”].QuickUploadPath = “%UserFilesPath%flash/”;
TypeConfig[“Media”].QuickUploadPath = “%UserFilesPath%media/”;
Remember to give ASP.NET worker process read/write access to the uploaded folder (UserFiles)!