extjs3.4集成ueditor将ueditor封装
2015-06-01 10:26
423 查看
Ueditor.js
Ueditor = Ext.extend(Ext.form.Field ,{ id : 'editor', defaultAutoCreate : {tag: 'div'}, constructor : function(cfg){ Ext.apply(this,cfg); this.listeners = { render : function(cmp) { var ueditor = new UE.ui.Editor({zIndex:10000,initialFrameWidth:"100%",/*initialFrameHeight : 205,*/}); this.ueditor = ueditor; ueditor.render(cmp.id); if(this.originalValue){ var v = this.originalValue; ueditor.ready(function(){ ueditor.setContent(v); }); } }, scope : this }; Ueditor.superclass.constructor.call(this); }, /** * 重写setValue方法 主要为修改设置值 * */ setValue : function(value){ if(!this.ueditor){ this.originalValue = value; }else{ this.ueditor.setContent(value); } } }); 调用方法: new Ueditor({ allowBlank : true, name : 'content', anchor : '99%', height : 205, fieldLabel : '' });
相关文章推荐
- extjs grid取到数据而不显示的解决
- ExtJS下grid的一些属性说明
- Extjs在exlipse中设置自动提示的方法
- 常用Extjs工具:Extjs.util.Format使用方法
- extjs DataReader、JsonReader、XmlReader的构造方法
- 学习ExtJS(一) 之基础前提
- extjs 为某个事件设置拦截器
- ExtJs 学习笔记基础篇 Ext组件的使用第1/2页
- Extjs列表详细信息窗口新建后自动加载解决方法
- Extjs grid添加一个图片状态或者按钮的方法
- Extjs学习笔记之四 工具栏和菜单
- extjs form textfield的隐藏方法
- ExtJS 2.0实用简明教程之应用ExtJS
- ExtJS Store的数据访问与更新问题
- 不用写JS也能使用EXTJS视频演示
- ecshop后台编辑器替换成ueditor编辑器
- Extjs改变树节点的勾选状态点击按钮将复选框去掉
- extjs 列表框(multiselect)的动态添加列表项的方法
- ExtJs默认的字体大小改变的几种方法(自己整理)
- ExtJS 配置和表格控件使用第1/2页