save ref to editor in scope