Quote Originally Posted by disfusion View Post
Hi Guys

I have been playing with CKEditor and Ext JS. I stripped down the FCKEditor example and created the following which seems to work for me. It is only the basics at the moment, not sure if more is needed.

the ckeditor.js extension file looks like this.
PHP Code:
/****************************************************
* CKEditor Extension
*****************************************************/
Ext.form.CKEditor = function(config){
    
this.config config;
    
Ext.form.CKEditor.superclass.constructor.call(thisconfig);
};

Ext.extend(Ext.form.CKEditorExt.form.TextArea,  {
    
onRender : function(ctposition){
        if(!
this.el){
            
this.defaultAutoCreate = {
                
tag"textarea",
                
autocomplete"off"
            
};
        }
        
Ext.form.TextArea.superclass.onRender.call(thisctposition);
        
CKEDITOR.replace(this.idthis.config.CKConfig);
    },
    
    
setValue : function(value){
        
Ext.form.TextArea.superclass.setValue.apply(this,[value]);
        
CKEDITOR.instances[this.id].setDatavalue );
    },

    
getValue : function(){
        
CKEDITOR.instances[this.id].updateElement();
        return 
Ext.form.TextArea.superclass.getValue(this);
    },

    
getRawValue : function(){
        
CKEDITOR.instances[this.id].updateElement();    
        return 
Ext.form.TextArea.superclass.getRawValue(this);
    }
});
Ext.reg('ckeditor'Ext.form.CKEditor); 
The Ext Js Form item is as follows:
PHP Code:
    {
        
xtype'ckeditor',
        
fieldLabel'Editor',
        
name'htmlcode',
        
CKConfig: {
            
/* Enter your CKEditor config paramaters here or define a custom CKEditor config file. */
            
customConfig '/ckeditor/config.js',        
            
toolbar'Basic',
            
height 200,
            
width250
        
}
    } 
You can enter CKEditor config paramaters in the CKConfig paramater or define a custom CKEditor config file and point to that.

I have also created an example application based on the "Form with embedded Grid" from the Ext JS 3.0 example file.

just download Ext JS 3.0 and CKEditor 3.0 and the example file extract them all and it should work, hopefully .


So nice...thx...

Wish you can make it to full version...