ok. i found the answer here:
http://cutesoft.net/forums/thread/46380.aspx
But now I need to know how to make the insertion value relative to site root, rather than absolute. I tried:
$editor->URLType = 'SiteRelative';
but that still inserts the full "http://www....", I just want "/imgfolder/filenam..."
Any ideas?