首先下載xheditor-1.1.13.zip包 在這個鏈接可下載到
http://download.csdn.net/detail/yy19900811/4990637
解壓該包獲得xheditor-1.1.13文件夾
將xheditor-1.1.13文件夾下的xheditor_emot、xheditor_plugins和xheditor_skin、jquery四個文件夾複製到你所需要在線編輯器的工程目錄下(與WEB-INF同級)
然後在你的jsp頁面中編寫代碼
注意textarea標籤中加入: class="xheditor"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Xh_editor</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type="text/javascript" src="${pageContext.request.contextPath }/jquery/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/xheditor-1.1.13-zh-cn.min.js"></script>
</head>
<body>
<form action="editor" method="post">
<textarea name="editor" class="xheditor" rows="12" cols="80" style="width: 80%"></textarea><br/>
<input type="submit" value="提交">
</form>
</body>
</html>