jsp中如何設置使用xheditor

首先下載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"


<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!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>


發佈了14 篇原創文章 · 獲贊 4 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章