PDA

View Full Version : htmleditor issue



nbritez_sisdam
29 Mar 2012, 7:01 AM
Hi community,

For a few last days, I was working with the htmleditor component.
I have two editors into a panel, and these, into a tab. When I have more than one editor with their parent panel, some strange error happen: since the second editor, the text area was disappear.
I'm attaching a screenshot to show you the issue.

Ronhead
29 Mar 2012, 7:13 AM
the ids or names are differents?
you can post the source about you 2 htmlfields

nbritez_sisdam
29 Mar 2012, 9:09 AM
The htmleditor component is stored into data var, may exists a lot of them.

var data = [{
xtype: 'panel',
style: 'margin: 5px 0 0 0',
layout: 'fit',
items: [{
xtype: 'htmleditor',
submitValue: false,
name: options.unicSecId,
id: options.unicSecId,
hideLabel: true,
height: 400,
pending: !! element.url,
listeners: {
scope: this,
afterrender: function (cmp) {
if(element.url) {
Ext.Ajax.request({
url: element.url,
success: function (response) {
cmp.setValue(response.responseText);
cmp.pending = false;
}
});
}
}
}
}]
}];


"panel" is a tab of tabpanel component, as above, may exists a lot of them too.

panel.add({
xtype: 'panel',
style: 'padding: 10px 10px 0 10px; margin: 2px 2px 0 2px;',
title: element.name,
tools: [{
id: 'minus',
qtip: this.Colapsar,
scope: this,
handler: function (event, toolEl, panel, tc) {
panel.toggleCollapse(true);
if(toolEl.dom.className == 'x-tool x-tool-plus') {
toolEl.dom.className = 'x-tool x-tool-minus';
toolEl.dom.qtip = this.Colapsar, panel.header.removeClass('round5');
} else {
toolEl.dom.className = 'x-tool x-tool-plus';
toolEl.dom.qtip = this.Expandir, panel.header.addClass('round5');
}
}
}],
items: [{
xtype: 'panel',
layout: element.type == 'DaterangeReference' ? 'form' : false,
bodyCssClass: 'roundBottom5',
style: 'padding: 5px 10px 10px 10px; border-width: 0 1px 1px 1px; border-style: solid; border-color: #99BBE8;',
items: [data]
}]
});


Each htmleditor has an own unique id.