Extjs 3.3 Add upload file button to an html Editor
As explained in the title, i want to add the possibility to upload images in a directory and add the html code of my image in the text.
I trie this example but the button is not visible.
Ext.onReady(function (){
Ext.ns(‘Ext.ux.form.HtmlEditor’);
var w = new Ext.Window({
width: 860,
layout: 'fit',
items: [
{
fieldLabel: 'Description',
name: 'description',
value: 'bwah bwah',
anchor: '100%',
id:'monHtmlEditor',
xtype: "htmleditor",
height: 400,
listeners:{
afterrender:function(){
this.getToolbar().addItem(
[
{
xtype: 'form',
id: 'monForm',
url: 'php/webServiceProjet.php?upload=1',
border: false,
fileUpload: true,
items:[
{
xtype: 'fileuploadfield',
id: 'monFileUpload',
name: 'monFileUpload',
buttonOnly: true,
hideLabel: true,
buttonText: '',
tooltip: 'monFileUpload',
buttonCfg: {
iconCls: 'bo'
}
/*
xtype: 'button',
iconCls: 'bo', //your iconCls here
handler: function(){
alert('eee');
//this.cmp.insertAtCursor('<hr>');
},
scope: this,
tooltip: 'horizontal ruler',
overflowText: 'horizontal ruler'
*/
}
]
}
]
)
}
}
}
]
});
w.show();
});
i think i can’t add a form in my toolbar.
is there a solution to upload images via the htmlEditor?
Thank you in advance for your replies.

