在WeX5上使用UEditor方法
来源:互联网 发布:java返回前台乱码 编辑:程序博客网 时间:2024/06/03 14:13
在WeX5上使用UEditor方法
(在WeX5 V3.7,UEditor JSP 1.4.3版本上测试通过。)
1、先按官网:http://fex.baidu.com/ueditor/#server-jsp 的方法安装UEditor。
2、修改UEditor目录下的ueditor.config.js,添加代码:
window.UEDITOR_HOME_URL = "/ue/"; //本例UEditor目录为ue。
在以下代码之上
var URL = window.UEDITOR_HOME_URL || getUEBasePath();
修改\ue\third-party\zeroclipboard文件夹下ZeroClipboard.js里的代码:
if (typeof define === "function" && define.amd) {
define(function() {
return ZeroClipboard;
});
} else if (typeof module === "object" && module && typeof module.exports === "object" && module.exports) {
module.exports = ZeroClipboard;
} else {
window.ZeroClipboard = ZeroClipboard;
}
修改为:
if (typeof define === "function" && define.amd) {
define(function() {
return ZeroClipboard;
});
} else if (typeof module === "object" && module && typeof module.exports === "object" && module.exports) {
module.exports = ZeroClipboard;
}
window.ZeroClipboard = ZeroClipboard;
3、然后复制UEditor到UI2的项目文件夹下,在使用的.w页面添加textarea组件,JS板块在define模块内增加代码:
require("$UI/项目文件夹/ue/ueditor.config");
require("css!$UI/项目文件夹/ue/themes/default/css/ueditor.css").load();
require("$UI/项目文件夹/ue/ueditor.all.min");
require("$UI/项目文件夹/ue/third-party/ZeroClipboard/ZeroClipboard");
在modelLoad模块内增加:
var ue = UE.getEditor('textarea1'); //生成UEditor界面
ue.ready(function() {
ue.setContent("新内容"); //设置编辑器内容
});
4、测试通过,使用正常。
阅读全文
0 0
- 在WeX5上使用UEditor方法
- 在SAE上使用Ueditor的图片上传功能
- Ueditor在.Net中的使用
- thinkphp中使用ueditor方法
- Wex5-共通方法-postRequest
- WeX5基本使用浅析
- django 在admin中使用ueditor
- 在django xadmin中使用 Ueditor
- 在bootstrap模态框里面使用ueditor
- 在django中使用ueditor插件
- 使用UEditor在门户中添加公告
- UEditor 在springmvc+maven 中的简单使用
- 在spring下使用百度编辑器ueditor
- django 在admin中使用ueditor
- 用Wex5集成讯飞语音听写并生成App在手机上运行
- wex5
- WeX5
- WeX5
- CentOS7 配置 vsftpd 以及参数详解
- C++构造函数和析构函数
- 大数据集群失联问题解决方案
- 学习笔记DL007:Moore-Penrose伪逆,迹运算,行列式,主成分分析PCA
- ranger启动报错Access denied for user 'root'@'%' to database 'ranger'
- 在WeX5上使用UEditor方法
- Atom安装插件被墙,解决方案:给apm设置中国国内镜像
- 【shell】find
- Java
- OpenCV计算机视觉入门案例
- 【转载】多态
- 【shell】tr
- 【shell】sort uniq
- 9. Roman to Integer