     )
   )
 
-initLinkFormat = ->
-  linkButton = @container.querySelector('.link')
-  return unless linkButton?
-  linkButton.addEventListener('click', =>
-    value = false
-    if !Scribe.DOM.hasClass(linkButton, 'active')
-      range = @editor.selection.getRange()
-      value = range.getText()
-    @editor.selection.format('link', value, false)
-    this.emit(Scribe.Toolbar.events.FORMAT, 'link', value)
-  )
-
 initFormats = ->
   _.each(Scribe.Toolbar.formats, (formats, formatGroup) =>
     _.each(formats, (format) =>

      return unless input?
      eventName = if formatGroup == 'SELECT' then 'change' else 'click'
      input.addEventListener(eventName, =>
        value = if formatGroup == 'SELECT' then input.options[input.selectedIndex].value else Scribe.DOM.hasClass(input, 'active')
        @editor.selection.format(format, value, { source: 'user' })
        this.emit(Scribe.Toolbar.events.FORMAT, format, value)
      )
    )


class Scribe.Toolbar extends EventEmitter2
  @formats:
    BUTTON: ['bold', 'italic', 'strike', 'underline', 'link', 'bullet', 'indent', 'outdent']
    SELECT: ['background', 'color', 'family', 'size']

  @events:
