Editor was global to all directives

Moved it down into the link function to limit the scope