U-editor文件上传

                                                  U-editor文件上传

使用目的:利用u-editor插件对文本进行编辑

用途举例;qq留言板,此博客的编辑也用到类似编辑器

操作步骤(1)工程右键-->other中的GBK换位UTF-8

       (2)工程下metaInf建一个文件夹,命名为ueditor全小写

      3)解压下载好的压缩包,所有文件都放在ueditor中(ueditor_releaseueditor1_4_3_1-utf8-jsp中utf-8中所有文件)

               (4)将ueditor_releaseueditor1_4_3_1-utf8-jsp中jsp中所有包拷贝到web-inf中的Lib中

      (5)在引入文本编辑器的jsp页中加入

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<% String path=getServletContext().getContextPath();%>

<!--配置文件-->
<script type="text/javascript" src="<%=path %>/ueditor/ueditor.config.js"></script>

<!--编辑器源码文件-->
<script type="text/javascript" src="<%=path %>/ueditor/ueditor.config.js"></script>

</head>
<body>
<textarea id="container" name="container" style="width:800px;height:400px;margin:0auto;"></textarea>
</body>
</html>

(5)在Webcontent--jsp--lib--config中"imageUrlPreFix":"/工程名/"/*图片访问路径前缀*/

 

------------------------------------------------------------------end----------------------------------------------------------------------------------

                                                                            

 

转载于:https://www.cnblogs.com/123luojuye/p/6503332.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值