more js fixes

text editor gets a nbsp when empty, to prevent it from jumping over the
page
image editor usability improvements