simplify editor directive
refactoring