<div ng-mouseenter="showEdit()" ng-mouseleave="hideEdit()" class="ep" ng-hide="editing">
  {{text}}&nbsp;<i class="ep-edit icon-pencil" title="Edit this item" ng-click="doEdit()" no-click></i>
</div>
<div class="ep" ng-show="editing" no-click>
  <form class="form-inline no-bottom-margin" ng-submit="saveEdit()">
    <fieldset>
      <input type="text" size="{{text.length}}" ng-style="getInputStyle()" value="{{text}}">
      <i class="green clickable icon-ok icon1point5x" title="Save changes" ng-click="saveEdit()"></i>
      <i class="red clickable icon-remove icon1point5x" title="Discard changes" ng-click="stopEdit()"></i>
    </fieldset>
  </form>
</div>
