THis is driving me nuts =(

All i want to do with any of these editors, is make it so that an image appears in the preview window.

I have a folder where my text editing is, ~root/edit/-editorname.js-

and I want any of the javascript text editors to read images from ~root/images/ rather then thinking its in the same folder as all the javascript files.

has anyone gotten this to work?
Ive been searching on the internet for days and going through some of them and can't figure it out