README.txt 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #######################################################################
  2. #
  3. # xhEditor 自述文件
  4. #
  5. #######################################################################
  6. 使用方法
  7. 1. 下载xhEditor最新版本。
  8. 下载地址:http://xheditor.com/download
  9. 2. 解压压缩文件,将其中的xheditor-zh-cn.min.js以及xheditor_emot、xheditor_plugins和xheditor_skin三个文件夹上传到网站相应目录
  10. 注:如果您网站中没有使用jQuery框架,也请一并上传jquery文件夹中的jquery-1.4.2.min.js
  11. 3. 在相应html文件的</head>之前添加
  12. <script type="text/javascript" src="http://static.xxx.com/js/jquery.js"></script>
  13. <script type="text/javascript" src="http://static.xxx.com/js/xheditor.js"></script>
  14. 注:如果jQuery之前已经在项目页面中使用,请勿重复添加引用代码
  15. 4.
  16. 方法1:在textarea上添加属性: class="xheditor"
  17. 例如:<textarea name="content" class="xheditor">test</textarea>
  18. 方法2:在您的页面初始JS代码里加上: $('#elm1').xheditor();
  19. $('#elm1').xheditor();
  20. 例如:
  21. $({
  22. $('#elm1').xheditor();
  23. });
  24. 相应的卸载编辑器的代码为
  25. $('#elm1').xheditor(false);
  26. 重要说明:2种初始化方法只能选择其中一种,不能混合使用,优先级分别是:方法1>方法2,例如用了方法1,方法2就无法使用了
  27. 更多帮助信息,请查看在线技术手册:http://xheditor.com/manual
  28. 或者参考demos文件夹中的演示页面
  29. 建议使用wizard.html初始化代码生成向导来生成适合你的代码。