         @focus()
         Mercury.uploader(event.originalEvent.dataTransfer.files[0])
 
-    @textarea.focus =>
+    @element.focus =>
       return if @previewing
       Mercury.region = @
-      @textarea.addClass('focus')
       Mercury.trigger('region:focused', {region: @})
 
-    @textarea.blur =>
-      return if @previewing
-      @textarea.removeClass('focus')
-      Mercury.trigger('region:blurred', {region: @})
-
-    @textarea.keydown (event) =>
+    @element.keydown (event) =>
       return if @previewing
       Mercury.changes = true
       @resize()

      return unless Mercury.region == @
      @execCommand(options.action, options) if options.action

    @textarea.bind 'dragenter', (event) =>
      return if @previewing
      event.preventDefault()
      event.originalEvent.dataTransfer.dropEffect = 'copy'

    @textarea.bind 'dragover', (event) =>
      return if @previewing
      event.preventDefault()
      event.originalEvent.dataTransfer.dropEffect = 'copy'

    @textarea.bind 'drop', (event) =>
      return if @previewing

      # handle dropping snippets


      @pushHistory(event.keyCode)

    @element.keyup =>
      return if @previewing
      Mercury.trigger('region:update', {region: @})

    @element.mouseup =>
      return if @previewing
      @focus()
      Mercury.trigger('region:focused', {region: @})

    @previewElement.click (event) =>
      $(event.target).closest('a').attr('target', '_top') if @previewing


  content: (value = null, filterSnippets = true) ->
    if value != null
      if $.type(value) == 'string'
        @element.val(value)
      else
        @element.val(value.html)
        @selection().select(value.selection.start, value.selection.end)
    else
      return @element.val()


  togglePreview: ->
    if @previewing
      @previewElement.hide()
      @element.show()
    else
      value = @converter.makeHtml(@element.val())
      @previewElement.html(value)
      @previewElement.show()
      @element.hide()
    super


