• Extjs定义的Fckeditor控件


    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;  " + editorWidth + "; height: " + editorHeight + "px;'>" +
                "</iframe>" +
                "</div>";
        }
    });
    //把新建的自定义组件注册为一种xtype
    Ext.reg('Fckeditor', CRM.Panels.Fckeditor);

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

  • 相关阅读:
    无符号数和有符号数之间赋值和大小比较
    (转)关于Linux核心转储文件 core dump
    mysql忘记root密码解决办法
    CentOS7安装iptables防火墙
    CENTOS7下安装REDIS
    iptables命令(备忘)
    ps 命令详解
    virtualenv
    How to Baskup and Restore a MySQL database
    linux 用户/用户组添加修改删除(ubuntu/centos)
  • 原文地址:https://www.cnblogs.com/anbylau2130/p/3637830.html
Copyright © 2020-2023  润新知