ExtJs HtmlEditor ReadOnly 无效
2010-11-01 15:41
232 查看
//任务内容信息(编辑器) var LogMsgEdit=new Ext.form.HtmlEditor({ id:"LogMsgEdit", name:"LogMsgEdit", fieldLabel:"任务内容", width:450 }); /*LogMsgEdit中readOnly无效,下面方法重写HtmlEditor可以实现HtmlEditor只读属性 http://www.sencha.com/forum/showthread.php?26657-FIXED-92-3.0.0-2.x-HtmlEditor-readOnly-and-disabled-not-working&highlight=htmleditor+property */ Ext.override(Ext.form.HtmlEditor, { /** * Set a readonly mask over the editor * @param {Boolean} readOnly - True to set the read only property, False to switch to the editor */ setReadOnly: function(readOnly){ if(readOnly){ this.syncValue(); var roMask = this.wrap.mask(); roMask.dom.style.filter = "alpha(opacity=0);"; //IE roMask.dom.style.opacity = "0"; //Mozilla roMask.dom.style.background = "white"; roMask.dom.style.overflow = "scroll"; this.el.dom.readOnly = true; } else { if(this.rendered){ this.wrap.unmask(); } this.el.dom.readOnly = false; } } });
//页面加载的时候,设置该控件的ReadOnly为只读 Ext.getCmp("LogMsgEdit").setReadOnly(true);
相关文章推荐
- Extjs htmleditor中内容导出成word (一)
- .Extjs HtmlEditor扩展插入图片功能
- (18)ExtJS之Ext.form.filed.HtmlEditor编辑器
- Extjs 支持图片上传的Html编辑器(StarHtmleditor)及其bug修正
- ExtJs htmleditor工具栏设置
- 关于extjs3.x htmleditor扩展图片上传及各浏览器兼容
- [转]Extjs关于切换只读的方式,readOnly和disabled属性切换
- ExtJs中的 'insertAdjacentHTML' 为空或不是对象错误原因及解决办法
- Ext htmleditor使用说明
- ExtJs 2.1 中的htmlEncode和htmlDecode不可逆
- ExtJs 2.1 中的HtmlEditor的disabled和readOnly
- Extjs控件之 grid打印成html功能
- 1j2ee即web项目,严格意义上来说,没有jsp代码,只有class文件、html文件、javascript文件。2 基于extjs框架的项目怎么怎么查看在浏览器中展示的最终html页面的代码 3
- Vue中使用Froala Editor时,外部方法调用html.insert()插入内容到光标最后停留位置功能实现
- html-css表单的margin-right/padding-right属性设置无效解决办法
- Extjs EditorGridPanel的使用.(数据从后台读出) asp.net
- HTML给div设置百分比高度无效的解决方式
- 在线安装eclipse中html/jsp/xml editor插件 eclipseeditor
- Markdown(editormd)语法解析成HTML
- Extjs 4 checkcolumn stopSelection 无效解决方法