【问题标题】:Having problems getting images to display within FCKEditor within ASP.NET website在 ASP.NET 网站的 FCKEditor 中显示图像时出现问题
【发布时间】:2010-10-03 20:27:38
【问题描述】:

我在使用 ASP.NET 的 FCKEditor html 编辑器时遇到问题,尝试在编辑器中插入图像,然后在图像属性对话框中单击“浏览服务器”时出现“找不到页面”错误。我想让它显示“图像”文件夹中的所有文件。

网站设置如下:-

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

我尝试将 ImageBrowserURL 设置为各种设置,例如“/images”,但这似乎没有返回到图像文件夹的正确路径。

有什么想法吗?

【问题讨论】:

    标签: asp.net fckeditor


    【解决方案1】:

    我认为问题在于“ImageBrowserUrl”不指向图像文件所在的路径,它指向实际文件浏览器所在的路径 - 您不必更改此设置。确保您已将 fckconfig.js 中的 _FileBrowserLanguage 和 _QuickUploadLanguage 设置为 'aspx'。

    要设置图像文件的路径,请将以下内容添加到 web.config:

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

    url是相对于网站根目录的,fckeditor默认使用的是/userfiles/。

    希望这会有所帮助。

    【讨论】:

    • 感谢工作。我还必须更改 Config.ascx 文件中的 TypeConfig["Image"].FilesPath,因为它在 %UserFiles% 中添加了一个名为 image 的子文件夹。
    • 忘了说我还必须将 中的值更改为“~/images/”
    【解决方案2】:

    同时检查How to set configuration or server to upload image in FCKEditor based on ASP.NET,看看它是否回答了您的问题。

    【讨论】:

      猜你喜欢
      • 2020-01-23
      • 1970-01-01
      • 1970-01-01
      • 2018-02-13
      • 2022-12-16
      • 1970-01-01
      • 2021-09-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多