         }
       else
         console.log "no attributes"
-      console.log "attrform", attrform
-      console.log "Required:", attrrequired
-      console.log "Optional:", attroptional
-
 
   init = (editor) ->
     return new ElementHandler(editor)

    # Delete a tag
    removeTag: (ui, params) ->

    attrListElement: (name, params, node) ->
      el = document.createElement("li")
      el.appendChild(document.createTextNode(name))
      el

    attrFormElement: (name, params, node) ->
      node = $(node)
      node = @editor.dom.select("##{node.attr('name')}")[0]
      if params.ns
        prefix = @editor.plugins.textorum.nsmap[params.ns]
        if prefix is undefined

          buttons: [{
            text: 'Ok'
            click: (e) -> 
              attrform.find("div.attrform:hidden").each (e) ->
                console.log "removing", $(this).data('attribute_name')
                editorNode.removeAttr $(this).data('attribute_name')
              attrform.find("div.attrform:visible").each (e) ->
                console.log "setting", $(this).data('attribute_name'), "to", $(this).find('.attrinput').val()
                editorNode.attr $(this).data('attribute_name'), $(this).find('.attrinput').val()
              wm.close(null, w.id)
          }, {
            text: 'Cancel'
