views:

1244

answers:

2

Hi, I'm having a problem with the FCKEditor html editor for ASP.NET in that when trying to insert an image within the editor and then clicking "browse server" in the Image Properties dialog I get an "page cannot be found" error. I want to get it to show all the files in the "images" folder.

The website is set up as follows:-

 \ Root
     - \ asp.net standard folders etc...
     - \ Images
     - \ FCKEditor - contains all the javascript etc..
     - Default.aspx - this contains the FCKEditor Control

I have tried setting the ImageBrowserURL to various settings such as "/images" but this doesn't seem to return the correct path to the images folder.

Any ideas ?

+3  A: 

I think the problem is that 'ImageBrowserUrl' doesn't point to the path where your image files reside, it points to the path where the actual file browser is located - you shouldn't have to change this setting. Make sure you have set _FileBrowserLanguage and _QuickUploadLanguage in fckconfig.js to 'aspx'.

To set the path to your image files add the following to your web.config:

  <appSettings>       
    <add key="FCKeditor:UserFilesPath" value="/images/" />
  </appSettings>

The url is relative to the website root, the default used by fckeditor is /userfiles/.

Hope this helps.

Phaedrus
Thanks that worked. I also had to change the TypeConfig["Image"].FilesPath in the Config.ascx file as it was adding a sub folder within %UserFiles% called image.
cyberbobcat
Forgot to say that I also had to change the Value in <appSettings> to say "~/images/"
cyberbobcat
+1  A: 

Also check How to set configuration or server to upload image in FCKEditor based on ASP.NET to see if it answers your question.

Mufasa
Thanks - this also helped.
cyberbobcat