Good morning.
In the course of developing the next project, I needed a simple plugin for the standard editor Ext.form.HtmlEditor, which would add images to the text. Actually it had to be done. Another bike, but it may be useful to someone else.
I must say that the functionality is minimal, at least for now. It is possible to view images, insert into the text several at once from the list. You can specify an address if it already exists somewhere. Well, the size of the name.
The plugin itself can be
picked up
on GoogleCode .
Since it is based on several more components, they will have to be collected from the Sencha website. Namely, the DataView component from the examples, Spinner and FileUpload. More
detail')
Connects to the editor by specifying an object as the plugins property. Like that:
new Ext.ux.form.HtmlEditor.Uploader({ store: new Ext.data.JsonStore({ root: 'data', proxy: new Ext.data.HttpProxy({ url: 'localhost/uploads.php',
In the object with the configuration, two properties are transferred: store — to specify the source with an array of images and url — the address where new images will be sent. You can also specify tpl, it sets the type of item in the list of pictures.
When uploading a new file to the server, the following POST parameters are transmitted:
image-height - image height
image-width - image width
image-title - Title for image (used in img tag title)
Plans to improve it a little and expand. Add the ability to select a directory and delete images. Well, maybe something else, until I came up with.
And at the end of the screenshot.

PS bug reports are accepted)
UPD: Forgot completely, the name of the file field image