The built in Image Editor with CKEditor is really great and the documentation sure did a great job of explaining how to switch on 'upload' feature. In a matter of minutes I was successfully uploading images onto our server, and seeing the results sent from the server.
However I had no way of knowing what response it expected from the server. Simply returning the image url, or an image tag didn't work. After hours googling, reading forum posts, and finally the source code form a couple of open source projects I finally got the thing working.