Directive for AngularJS to turn an element into an editable input