Ueditor在ASP.NET的配置说明.Ueditor在ASP.NET配置上传图片路径.ASP.NET配置Ueditor编辑器上传图片路径

 

Ueditor在ASP.NET的配置说明

 前几天,用到富文本。选了好久选中了百度的百度的Ueditor。

 但是在使用配置中遇到了一系列的问题。

 以下是我的配置,先按照我说的方法配置好以后,如果还有问题的话,请留言我。

 先说一下我的配置环境 .net framework 3.5 + UEditor[1.3.5 .Net 版本] UTF-8版。

 

UEditor解压缩放到网站目录下(我是放到根目录下的)

1, .net framework 4.0以下版本删除 ueditor/net 下的Web.config

2,找到ueditor/net 下的Config.cs 文件 和 Uploader.cs 文件。 分别右键这两个文件,属性-生成操作-修改为“内容

3,修改ueditor/net 下的imageUp.ashx
  context.Response.Write(String.Format("updateSavePath([{0}]);", String.Join(", ", Config.ImageSavePath.Select(x => "\"" + x + "\""))));

  改为
  context.Response.Write(String.Format("updateSavePath([{0}]);", String.Join(", ", Config.ImageSavePath.Select(x => "\"" + x + "\"").ToArray())));

经过以上操作。一般情况下,UEditor可以正常显示

以下操作,是修改图上传路径

ueditor/net 下的 Config.cs 文件 ImageSavePath 是设置的上传目录。

本事例是将 ImageSavePath 的目录创建在 网站根目录下。

  1,修改ueditor/net/imageUp.ashx文件,将文件头部的<%@ Assembly Src="Uploader.cs" %>删除掉

  2,修改ueditor/net/Uploader.cs文件,uploadpath = cxt.Server.MapPath("~/" + pathbase);//获取文件上传路径

  3,修改ueditor.config.js  中的imagePath  为   imagePath:"../"  //图片修正地址

  4,修改ueditor.config.js  中的imageManagerPath  为 imageManagerPath:"http://localhost:端口号/" (例如imageManagerPath:"http://localhost:3808/" )

 

 我的小站

posted on 2014-01-07 13:55  用户不存在  阅读(410)  评论(0编辑  收藏  举报