UEditor是由百度web前端研发部开发所见即所得富文本web编辑器,具有轻量,可定制,注重用户体验等特点,开源基于BSD协议,允许自由使用和修改代码

 UEditor使用说明

 

 

下载地址:http://ueditor.baidu.com/website/download.html#

这里我下载的.NET GBK

下载后解压将整个文件复制网站下面路径随便,我放在根目录下面文件名UEdit

 UEditor使用说明

 

  1. 在页面引用:

    <script src="../../UEdit/editor_all_min.js" type="text/javascript"></script>

<script src="../../UEdit/editor_config.js" type="text/javascript"></script>

  1. 在页面加载控件:

 UEditor使用说明

 

3.点击保存的时候:通过

UEditor使用说明

 

Editor.getContent()就可以把当前文本以Html的格式存到数据库中。

 

遇到的问题:

  1. 发布公告图片上传显示错误,下载附件链接错误

解决方法:修改editor_config.jsimageUrl链接,添加下载的方法

 UEditor使用说明

 

 UEditor使用说明

 

 

  1. 页面如何把数据库字段存的html内容变成具有格式的文本。

解决方法:用:@Html.Raw(Model.Content.ToString()),就可以识别读取出数据的html标签。

 推荐:https://www.cnblogs.com/shuideqing/p/9649590.html

相关文章:

  • 2022-01-30
  • 2021-09-19
  • 2021-04-29
  • 2021-09-13
  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-21
  • 2022-12-23
  • 2021-05-30
  • 2022-12-23
  • 2021-12-29
  • 2022-12-23
相关资源
相似解决方案