ExtJs Ext.form.field.TextArea+Ckeditor 扩展富文本编辑器

时间:2014-02-21 00:28:00   收藏:0   阅读:815
bubuko.com,布布扣
Ext.define("MyApp.base.BaseTextArea", {
    extend: "Ext.form.field.TextArea",
    xtype: "BaseTextArea",
    
    editor: null,
    
    initComponent: function() {
        this.callParent();
        this.on("afterrender", this.handlerAfterrender);
    },
    
    handlerAfterrender: function(txa, eOpts) {
        var editor = CKEDITOR.replace(txa.getInputId());  
        CKFinder.setupCKEditor(editor,‘/ckeditor/‘);
        txa.editor = editor;
    },
    
    getSubmitValue: function() {
        this.editor.updateElement();
        return this.callParent();
    }
});
bubuko.com,布布扣

原文:http://www.cnblogs.com/daxin/p/3557427.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!