Pass editor as last parameter to handlers. Set empty functions to () -> undefined