PDA

View Full Version : HTMLeditor and setValue problem....



evilized
22 Oct 2007, 6:38 AM
hi :)

i'm working with the HTMLEditor and i'm having a bit problem when i set the value of this with the setValue function.

i'm recovering the value from PHP with an ajax request.


Ext.Ajax.request({
url:'resources/backend/mails.php?do=get',
method:'post',
params:{ml_id:ml_id},
success:function(resp,opts){
var data = Ext.decode(resp.responseText);

form.findField('f_content').setValue(data.f_content);

}
});my HTMlEditor definition.


new Ext.form.HtmlEditor({
id:'f_content',
fieldLabel:'Mensaje',
width:'100%',
height:300
})
but, the content of the HTMLEditor is like wrong... :(

i've added a screenshot for example.

please, any help for me is usefull

evilized
23 Oct 2007, 4:55 AM
i was working on this for all day "yesterday", and i found a solution to my problem.




HTMLEditorInstance..on('initialize',function(editor){
editor.setSize(editor.wrap.getSize());
});



so, the editable area is full in the HTMLEditor space.

i've attached a screenshot for the result of this method.