Hi - in the end I have solved the problem using the OnActionBegin method instead of the InsertImageSettings to capture the appearance of an image by any means as follows:
function rteActionBegin(event)
{
if (event.requestType === "Image")
{
var fd = new FormData();
var xhr = new XMLHttpRequest;
xhr.responseType = 'blob';
xhr.onload = function ()
{
fd.append('data', xhr.response);
$.ajax(
{
type: 'POST',
url: '...' //Put here the url to the server-side method that saves your image - including any parameters you want encoded into the url
data: fd,
processData: false,
contentType: false
})
.done(function (data)
{
if (data.error)
{
$.jGrowl(data.error);
} else
{
var url = data.image_url; //The server-side method returns a url for the saved image
var img = $('img[src="' + event.itemCollection.url + '"]');
img.prop('src', url);
}
});
};
xhr.open('GET', event.itemCollection.url);
xhr.send();
}
}
This also works with pasted and drag/dropped images straight into the RTE editor field - whereas the InsertImageSettings method doesn't seem to pick those up.