Happy new。解決策を見つけました。
Ext.define('Ext.ux.form.field.CKEditor', {
extend: 'Ext.form.field.TextArea',
alias: 'widget.ckeditor',
constructor: function() {
this.callParent(arguments);
this.addEvents("instanceReady");
this.addEvents("blur");
},
initComponent: function() {
this.callParent(arguments);
this.on("afterrender", function() {
Ext.apply(this.CKConfig, {
height: this.getHeight(),
width: this.getWidth()
});
this.editor = CKEDITOR.replace(this.inputEl.id, this.CKConfig);
this.editor.name = this.name;
this.editor.on("instanceReady", function() {
this.fireEvent("instanceReady", this, this.editor);
}, this);
this.editor.on("blur", function(){
this.fireEvent("blur", this, this.editor);
}, this)
}, this);
},
onRender: function (ct, position) {
if (!this.el) {
this.defaultAutoCreate = {
tag: 'textarea',
autocomplete: 'off'
};
}
this.callParent(arguments)
},
setValue: function (value) {
this.callParent(arguments);
if (this.editor) {
this.editor.setData(value);
}
},
getValue: function() {
if (this.editor) {
console.log(this.editor.getData());
return this.editor.getData();
}
else {
return ''
}
}
});
これは、ckeditorとEXT jSを統合します。
既に試したコードを入力してください。http://stackoverflow.com/help/how-to-askよく質問する方法をご覧ください。 –