Javascript based image editor