set up editor and fix focus