Refactor `with-editor-export-editor'