I've implemented TinyMCE on an ExtJS Window that works fine on first load, but after hiding, calling setValues() with new data, then showing the Window again the rich-text field is not updated with the new data. It shows the same data as when it was first loaded.
Code is roughly as follows (simplified for clarity):
MyCmp.window.RichText = function(config) {
config = config || {};
Ext.applyIf(config,{
layout: 'form'
,fields: [{
xtype: 'textarea'
,name: 'rte_field'
,id: 'mycmp-rte-field'
,fieldLabel: 'Rich Text Field'
}]
});
MyCmp.window.RichText.superclass.constructor.call(this,config);
this.on('activate',function() {
// load Rich Text Editor
if (typeof Tiny != 'undefined') {
MODx.loadRTE('mycmp-rte-field');
}
},this);
};
Ext.extend(MyCmp.window.RichText,MODx.Window);
Ext.reg('mycmp-window-richtext',MyCmp.window.RichText);
The window record
is updating with the new data, so it appears I need to reload/refresh TinyMCE somehow. Any ideas?
[ed. note: okyanet last edited this post 11 years, 9 months ago.]