基于jquery的在线编辑器XHEditor

使用方法

1. 下载xhEditor最新版本。
   下载地址:http://code.google.com/p/xheditor/downloads/list

2. 解压zip文件,将其中的xheditor.js以及xheditor_emot、xheditor_plugins和xheditor_skin三个文件夹上传到网站相应目录

3. 在相应html文件的</head>之前添加
<script type="text/javascript" src="../../jquery/jquery-1.3.2.min.js"></script>
 <script type="text/javascript" src="../../xheditor.js"></script>
根据需要改变相对路径

4.
方法1:在textarea上添加属性: class="xheditor"
方法2:在您的页面初始JS代码里加上:
$('#elm1').xheditor(true);
例如:
$({
$('#elm1').xheditor(true);
});
相应的隐藏编辑器的代码为
$('#elm1').xheditor(false);

 

 

注意:

xheditor.js和xheditor_emot、xheditor_plugins和xheditor_skin必须在同一目录下(一般都在根目录下),否则编辑器的工具条显示不出来

jsp页面:加入

<textarea id="content" name="content" class="xheditor" rows="50" cols="150" style="width:100%">
            </textarea>

class还可以取的值

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值