     #next_node = anchor_node.nextSibling
 
     if (e.which == 8)
+      console.log "DELETING"
       console.log anchor_node
       console.log $(anchor_node).parent() #if !$(anchor_node).parent()
 
+      #if there is no anchor and is only a text node
       if !anchor_node or anchor_node.nodeType is 3
         e.preventDefault()
-        @render()
-
-        console.log "setting existing range"
-        @setupElementsClasses ()=>
-          existent = $(@el).find('.section-inner').children().first()
-          console.log("hogi")
-          console.log existent
+
+        existent = $(@el).find('.section-inner').find("p:first")
+        if _.isEmpty(existent)
+          @render()
+          console.log "setting existing range"
+          @setupElementsClasses ()=>
+            new_node = $(@el).find('.section-inner').children().first()
+            console.log("hogi")
+            console.log existent
+            new_node.focus()
+            @setRangeAt(new_node[0])
+            #@wrapTextNodes()
+        else
           existent.focus()
           @setRangeAt(existent[0])
-
-          @wrapTextNodes()
+          #@wrapTextNodes()
+        false
+      if !anchor_node
+
+        existent = $(@el).find('.section-inner').find("p:first")
+        console.log(existent)
+        if !_.isEmpty(existent)
+          existent.focus()
+          debugger
+          @setRangeAt(existent[0])
 
         false
 

    #TODO: should config tags
    console.log("CLEAN CONTENTS NAW")
    s = new Sanitize
      elements: ['a', 'span', 'pre', 'p', 'h1', 'h2', 'h3']
      attributes:
          '__ALL__': ['class']
          a: ['href', 'title']

    else
      console.log "can't find command function for name: " + name

    #@cleanContents()
    false

  cleanContents: ()->
