There is no tool to directly insert an image in the document with JavaScript.
Probably the easiest way would be creating a Button field where the image should go, and then use importIcon() to import the image, and buttonSetIcon() to insert it into the field.
Hope this can help.
Max Wyss.