ueditor(1.4.3)的使用
1.新增相關檔案
2.匯入jar包以及相關Java類
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'],
如圖:
6.可執行檔案下載