       @editor = WysiHat.Editor.attach($(editor))
 
       cfg = 
-        buttons: ['bold', 'italic', 'underline', 'image']
+        buttons: [
+          {
+            name: 'bold',
+            label: 'Bold',
+            handler: (editor) ->
+              editor.boldSelection()
+            query: (editor) ->
+              editor.boldSelected()
+          }
+          {
+            name: 'italic',
+            label: 'Italic',
+            handler: (editor) ->
+              editor.italicSelection()
+            query: (editor) ->
+              editor.italicSelected()
+          }
+          {
+            name: 'underline',
+            label: 'Underline',
+            handler: (editor) ->
+              editor.underlineSelection()
+            query: (editor) ->
+              editor.underlineSelected()
+          }
+          {
+            name: 'ol',
+            label: 'Ordered list',
+            handler: (editor) ->
+              editor.toggleOrderedList()
+            query: (editor) ->
+              editor.unorderedListSelected()
+          }
+          {
+            name: 'ul',
+            label: 'Unordered list',
+            handler: (editor) ->
+              editor.toggleUnorderedList()
+            query: (editor) ->
+              editor.orderedListSelected()
+          }
+          {
+            name: 'image',
+            label: 'Insert image',
+            handler: (editor) ->
+              self.insertImageHandler()
+          }
+        ]
         dropdowns: [
           {
             name: 'headers',

      @toolbar = @editor.prevAll('.editor_toolbar:first')

      $.each cfg.buttons, (i, button) ->
        switch button.toLowerCase()
          when 'bold'
            toolbar.addButton {label : 'Strong', handler: (editor) -> return editor.boldSelection()}
          when 'italic'
            toolbar.addButton {label : 'Italic', handler: (editor) -> return editor.italicSelection()}
          when 'underline'
            toolbar.addButton {label : 'Underline', handler: (editor) -> return editor.underlineSelection()}
          when 'image'
            toolbar.addButton {label : 'Insert Image', handler: (editor) => return self.insertImageHandler()}
          else
            toolbar.addButton {label : button}

      $.each cfg.dropdowns, (i, dropdown) ->
        toolbar.addDropdown dropdown

      #Place each text node within range inside a <span>
      #element with the desired class
      for node in selectedNodes
        $.each removeClasses, (i, name) ->
          $(node).removeClass(name)

        wrapper = node
        while (wrapper.parentNode && wrapper.parentNode != range.commonAncestorContainer)
          wrapper = wrapper.parentNode

        if (wrapper.nodeType != 1)
          $(wrapper).wrap("<div class='#{addClass}'/>")
        else
          $(wrapper).toggleClass(addClass)

    content: () ->
      return @editor.html()
