ueditor(1.4.3)的使用

1.添加相关文件

ueditor(1.4.3)的使用

2.导入jar包以及相关Java类

ueditor(1.4.3)的使用ueditor(1.4.3)的使用

3.图片上传配置

ueditor(1.4.3)的使用

ueditor(1.4.3)的使用

4.多图片在线管理controller.jsp修改成如下:

<%@ page language="java" contentType="text/html; charset=UTF-8"  
   
    import="com.baidu.ueditor.ActionEnter"  
   
    pageEncoding="UTF-8"%>  
<%@ page trimDirectiveWhitespaces="true" %>  
<%  
request.setCharacterEncoding( "utf-8" );  
response.setHeader("Content-Type" , "text/html");  
   
String rootPath = application.getRealPath( "/" );  
   
String action = request.getParameter("action");  
String result = new ActionEnter( request, rootPath ).exec();  
if( action!=null &&   
   (action.equals("listfile") || action.equals("listimage") ) ){  
    rootPath = rootPath.replace("\\", "/");  
    result = result.replaceAll(rootPath, "/");  
}  
out.write( result );  
%>  

5.插入动态地图空白

在ueditor.config.js文件xss过滤白名单中添加   iframe: ['frameborder','border','marginwidth','marginheight','width','height','src','id'],

如图:

ueditor(1.4.3)的使用

6.可运行文件下载

点击打开链接