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

 

Ueditor在ASP.NET的配置说明

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

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

 如下是个人配置,先按照我说的方法配置好之后,若是还有问题的话,请留言我。spa

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

 

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

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

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

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())));
it

通过以上操做。通常状况下,UEditor能够正常显示class

如下操做,是修改图上传路径

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/" )

 

 个人小站

相关文章
相关标签/搜索