improved editor to show javascript errors