1. 程式人生 > >富文本編輯器UEditor的配置使用方法

富文本編輯器UEditor的配置使用方法

效果 es2017 如果 配置使用 cnblogs 是我 nta asc utf-8

將下載的富文本編輯器的文件解壓後放到 webcontent 下

如果 文件中的jsp文件夾下的controller.java文件報錯的話 就將jsp下的lib文件夾中的文件都復制到 web-inf 文件夾下的lib中,就可以解決報錯的問題了

按理說 還需要修改config.js中的URL值 但是我沒修改 運行也出來效果了

<%@ 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>
</head>
<body>

<script id="container" name="content" type="text/plain">
   這裏寫初始化內容
</script>

<script type="text/javascript" src="ueditor/ueditor.config.js"></script>//

<script type="text/javascript" src="ueditor/ueditor.all.js"></script>

<script type="text/javascript">
    var ue=UE.getEditor("container");
</script>
</body>
</html>

  技術分享

富文本編輯器UEditor的配置使用方法