Ext.namespace('CRM.Panels');
//Ext.BoxComponent 这里继承是参考的Ext.form.Field
CRM.Panels.Fckeditor = Ext.extend(Ext.BoxComponent, {
initComponent: function() {
var fckMainBodyId = this.fckMainBodyId == "" ? "fckMainBodyId" : this.fckMainBodyId;
var fckMainBodyConfigId = this.fckMainBodyConfigId == "" ? "fckMainBodyConfigId" : this.fckMainBodyConfigId;
var editorWidth = this.editorWidth == "" ? "100%" : this.editorWidth;
var editorHeight = this.editorHeight == "" ? "300" : this.editorHeight;
this.html = "<div>" +
"<input type='hidden' value='' name='" + fckMainBodyId + "' id='" + fckMainBodyId + "'>" +
"<input type='hidden' value='HtmlEncodeOutput=true' id='" + fckMainBodyConfigId + "'>" +
"<iframe width='" + editorWidth + "' scrolling='no' height='" + editorHeight + "px' frameborder='no' " +
"src='/fckeditor/editor/fckeditor.html?InstanceName=fckMainBody&amp;Channel=EWSOS&amp;" +
"Toolbar=Default' id='fckMainBody___Frame' " +
"style='margin: 0px; padding: 0px; border: 0px none; background-color: transparent; background-image: none; width: " + editorWidth + "; height: " + editorHeight + "px;'>" +
"</iframe>" +
"</div>";
}
});
//把新建的自定义组件注册为一种xtype
Ext.reg('Fckeditor', CRM.Panels.Fckeditor);

/*使用:
items:[
{
xtype: "Fckeditor",
editorHeight: "600",
editorWidth:"100%"
}
]*/

Extjs定义的Fckeditor控件的更多相关文章

  1. C# 如何定义让PropertyGrid控件显示[...]按钮,并且点击后以下拉框形式显示自定义控件编辑属性值

    关于PropertyGrid控件的详细用法请参考文献: 1.C# PropertyGrid控件应用心得 2.C#自定义PropertyGrid属性 首先定义一个要在下拉框显示的控件: using Sy ...

  2. Jsp页面中使用fckeditor控件的两种方法 [转]

    fckeditor控件请到官方网站下载http://www.fckeditor.net,本例主要用到FCKeditor_2.6.3.zip.fckeditor-java-demo-2.4.1.zip. ...

  3. EXTJS 3.0 资料 控件之 html 潜入label用法

    这是在Extjs 中插入html 控件label! html: "<div><label id='howMany'>您共选中了</label><br ...

  4. EXTJS 3.0 资料 控件之 combo 用法

    EXTJS combo 控件: 1.先定义store //年款 var comboData_ReleasYear = [ ['], ['], ['], ['] ]; 2.定义combo控件 { lay ...

  5. ExtJs内的datefield控件选择日期过后的事件监听select

    [摘要]: 选择时间过后我们为什么需要监听事件?一般有这样一种情况,那就是用于比较两个时间大小或者需要判断在哪个时间点上需要做什么样的操作.基于这样的种种情况,我们很有必要琢磨一下datefield控 ...

  6. EXTJS 4.2 资料 控件之combo 联动

    写两个数据源: 1.IM_ST_Module.js { success:true, data:[ { ModuleId: '1', ModuleName: '资讯' } , { ModuleId: ' ...

  7. EXTJS 4.2 资料 控件之Grid 那些事

    最近在学习Extjs4.2 ,积累文章,看得不错,再此留年: //表格数据最起码有列.数据.转换原始数据这3项 Ext.onReady(function(){ //定义列 var columns = ...

  8. Android 实现自己定义多级树控件和全选与反选的效果

    博文開始之前,首先要感谢大牛:(lmj623565791),本博文是在其博文http://blog.csdn.net/lmj623565791/article/details/40212367基础上进 ...

  9. Extjs DateTime 日期时间选择控件 (非点击日期强制选择) 支持4.0以上

    Extjs的日期控件,仅仅能支持到日期选择,对时间的选择并不完好.而网上下载的控件,都是基于Ext.form.dateField 开发.在选中日期后自己主动选择,并隐藏此选择窗体. 在经过一番改造后, ...

随机推荐

  1. SpringBoot的文件下载

    SpringBoot的文件下载 2017年11月29日 10:32:20 阅读数:3907 SpringBoot的文件下载方法有很多,此处只记录使用Spring的Resource实现类FileSyst ...

  2. PHP也玩并发,巧用curl 并发减少后端访问时间

    首先,先了解下 php中的curl多线程函数: # curl_multi_add_handle# curl_multi_close# curl_multi_exec# curl_multi_getco ...

  3. Java sun.misc.unsafe类

    Java是一个安全的开发工具,它阻止开发人员犯很多低级的错误,而大部份的错误都是基于内存管理方面的.如果你想搞破坏,可以使用Unsafe这个类.这个类是属于sun.*API中的类,并且它不是J2SE中 ...

  4. [技术选型] spring boot

    参考博客:http://jinnianshilongnian.iteye.com/blog/1997192 官网:http://projects.spring.io/spring-boot/ 7天学会 ...

  5. 第三百三十五节,web爬虫讲解2—Scrapy框架爬虫—豆瓣登录与利用打码接口实现自动识别验证码

    第三百三十五节,web爬虫讲解2—Scrapy框架爬虫—豆瓣登录与利用打码接口实现自动识别验证码 打码接口文件 # -*- coding: cp936 -*- import sys import os ...

  6. Python——Requests库的开发者接口

    本文介绍 Python Requests 库的开发者接口,主要内容包括: 目录 一.主要接口 1. requests.request() 2. requests.head().get().post() ...

  7. Python 3.x标准模块库目录

    出处:http://blog.csdn.net/sadfishsc/article/details/10390065 文本 1. string:通用字符串操作 2. re:正则表达式操作 3. dif ...

  8. HTTP 请求头与请求体 - 某熊的全栈之路 - SegmentFault

    本文从属于笔者的HTTP 理解与实践系列文章,对于HTTP的学习主要包含HTTP 基础.HTTP 请求头与请求体.HTTP 响应头与状态码.HTTP 缓存这四个部分,而对于HTTP相关的扩展与引申,我 ...

  9. Spring Cloud 微服务的那点事

    什么是微服务 微服务的概念源于2014年3月Martin Fowler所写的一篇文章“Microservices”. 微服务架构是一种架构模式,它提倡将单一应用程序划分成一组小的服务,服务之间互相协调 ...

  10. iOS:PSTCollectionView

    https://github.com/steipete/PSTCollectionView Open Source, 100% API compatible replacement of UIColl ...