Despite the capabilities the built-in file manager offers sometimes a custom file manager/file uploader is needed.
I develop ASP.NET sites so I needed a "bridge" between the HTML/javascript coded FCKEditor and the ASP.NET code.
First of all, however, I needed means to control whether the "Browse Server" button is displayed in the dialog.

This property is set in fckconfig.js located in fckeditor folder. The property is
FCKConfig.ImageBrowser = true;
and is set to "true" by default.
More interesting is, nowever, to change what this button displays and therefore change the way images are accessed. One common way to store images is in MSSQL server in which case the default image browsing as well image uploading is useless.
If we can display a plain ASP.NET page it is enough as a starting point to solving the problem. The .NET "wrapper" which allows instantiating FCKEditor(s) on a ASP.NET page has a property called "ImageBrowserURL". This property holds the URL of the page that can embed the required functionality.
So far so good, but we also need to pass the URL of the selected image back to the dialog and finaly to insert it in the HTML script. Fortunately this can be done by a call to the SetUrl() function located in fckeditor\editor\dialog\fck_image\fck_image.js.
The following code snippet is all that is needed:
function PassSelectedItem() {
var url = document.getElementById('TextBoxImageUrl').value;
window.opener.SetUrl(url);
window.close();
return false;
}
It is embedded in the ASP.NET page and is executed OnClientClick of a button, which submits the selected image URL back to the dialog.TextBoxImageUrl is the name of the TextBox control holding the selected image URL.
(click on the picture to enlarge...).






