refactor update editor view code