jquery xheditor

来源:互联网 发布:大智慧编程教程 编辑:程序博客网 时间:2024/05/02 01:12

1 下载 xheditor

2 在js文件夹当中引入三个文件夹(xheditor_emot  xheditor_plugins  xheditor_skin)和一个文件xheditor.js


3 加入下面的代码

<script src="/test/js/jquery.js" type="text/javascript"></script> <script src="/test/js/xheditor.js" type="text/javascript"></script> <!-- 不要忘记引入css --><link rel="stylesheet" href="/test/js/common.css" type="text/css" media="screen" />



加入一个textarea标签,将class的属性设置为xheditor


整体代码如下

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><script src="/test/js/jquery.js" type="text/javascript"></script> <script src="/test/js/xheditor.js" type="text/javascript"></script> <!-- 不要忘记引入css --><link rel="stylesheet" href="/test/js/common.css" type="text/css" media="screen" /></head><body> <textarea class="xheditor" rows="12" cols="80" /></body></html>