only runs if an editor is active