xhEditor入门基础

一、下载最新版本号xhEditor:http://xheditor.com/download  (官网无法下载,CSDN提供下载:http://download.csdn.net/detail/itmyhome/7741815)

二、将下载的压缩文件解压缩,上传当中的xheditor.min.js以及xheditor_lang、xheditor_emot、xheditor_plugins和xheditor_skin

        四个目录到站点对应目录中。

        注:假设您没有使用jQuery框架,也请一并上传jquery.js

三、页面加入下面代码:

<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="/js/xheditor.min.js"></script>
<script type="text/javascript" src="/js/xheditor_lang/zh-cn.js"></script>
注:jQuery和xhEditor的js文件路径请依据你站点详细路径情况对应改动

四、在须要实现可视化的文本框textarea属性中加入:class="xheditor"  比如:

<textarea name="content" rows="10" cols="110" class="xheditor">Hello xHeditor</textarea>

效果例如以下:


项目演示源代码下载:http://download.csdn.net/detail/itmyhome/7741815

posted @ 2017-07-20 09:18  zsychanpin  阅读(175)  评论(0编辑  收藏  举报