       @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',

        containerElement = containerElement.parentNode

      treeWalker = document.createTreeWalker containerElement,
                                             NodeFilter.SHOW_ALL,
                                             (node) ->
                                               return if rangeIntersectsNode(range, node)
                                                        NodeFilter.FILTER_ACCEPT
                                                      else
                                                        NodeFilter.FILTER_REJECT
                                             ,
                                             false

      selectedNodes = []
      while (treeWalker.nextNode())

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

      $.each cfg.buttons, (i, button) ->
        toolbar.addButton button

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