     else
       $contents = $(range.extractContents())
       linkText = @editor.formatter.clearHtml($contents.contents(), false)
-      $link = $('<a/>', {
+      @$link = $('<a/>', {
         href: '',
         target: '_blank',
         text: linkText || @_t('linkText')
       })
 
       if @editor.selection.blockNodes().length > 0
-        range.insertNode $link[0]
+        range.insertNode @$link[0]
       else
-        $newBlock = $('<p/>').append($link)
+        $newBlock = $('<p/>').append(@$link)
         range.insertNode $newBlock[0]
 
-      range.selectNodeContents $link[0]
+      range.selectNodeContents @$link[0]
 
       @popover.one 'popovershow', =>
         if linkText


    @confirm.on 'click', (e) =>
      return if e.which == 13
      return @urlEl.trigger('focus') if @confirm.hasClass('disabled')

      val = @urlEl.val()

      val = 'http://' + val unless /https?:\/\/|^\//ig.test(val) or !val
      @confirm[if val then 'removeClass' else 'addClass']('disabled')

      @target.attr 'href', val
      @editor.inputManager.throttledValueChanged()
      @active = true
      @hide()

      return if e.which == 13
      @target.text @textEl.val()
      @editor.inputManager.throttledValueChanged()
      @checkButtonStatus()

    @urlEl.on 'keyup', (e) =>
      return if e.which == 13
      @checkButtonStatus()

    $([@urlEl[0], @textEl[0]]).on 'keydown', (e) =>
      if e.which == 13 or e.which == 27 or
