catch and show javascript errors on loading edit pages
don't use Editor.beforeRemove

it seems to be broken!

fixes #198
Merge branch 'master' into templates
add step size to range template