save and restore editor instance state