refactor inplace editor switch