Refactor editor markup