Make editor return via a callback rather than a handler