Improve api for editor