       </div>
     """
     @DATAVIEW.find('.properties').append(str)
+
+  submitPropertyForm: (e) =>
+    e.preventDefault();
+
+    data = {}
+
+    #extract existing properties (with name attrs)
+    form = $(e.target).serializeArray()
+
+    $.each form, (i, d) =>
+      data[d.name] = d.value
+
+    #add new properties
+    $(e.target).find('.graphedit-new-property').each (i, elm) =>
+      key = $(elm).find('input').first().val()
+      value = $(elm).find('input').last().val()
+      if key.length > 0
+        data[key] = value
+
+    #what's being edited?
+    target = null
+    if @selected_nodes.length == 1 and @selected_edges.length == 0
+      target = @selected_nodes[0]
+    else if @selected_nodes.length == 0 and @selected_edges.length == 1
+      target = @selected_edges[0]
+
+    if target == null
+      throw "Not sure what you were editing"
+
+    $.extend d3.select(target).data()[0].properties, data
+
+    @restart
 
 
 # GRAPHEDIT PLUGIN DEFINITION

  #add a new property to the form
  clickNewProperty: () =>
    str = """
      <div class="form-group">
        <div class="col-sm-4">
          <input class="form-control input-sm">
        </div>

      @DATAVIEW.html('<p class="text-muted text-center">Multiple items selected</p>')

    $('.add_property').on 'click', @clickNewProperty
    $('.graphedit-property-form').on 'submit', @submitPropertyForm

  # display highlight on selected items
  drawSelection : () =>
