anchor.diff:        metacode_id: metacode.id,
         permission: permission || Metamaps.Active.Map.get('permission'),
         desc: desc,
  -      link: link
  +      link: link,
  +      import_id: import_id
       });
       Metamaps.Topics.add(topic);
   
  
positive.code:  */
  
  Metamaps.Import = {
    headersWhitelist: [
  		'name', 'metacode', 'desc', 'link', 'permission'
  	],
  
    init: function() {
      var self = Metamaps.Import;
      $('body').bind('paste', function(e) {
        var text = e.originalEvent.clipboardData.getData('text/plain');
        var parsed = self.parseTabbedString(text);
  
        if (parsed.length > 0 &&
          confirm("Are you sure you want to create " + parsed.length +
                  " new topics?")) {
          self.importTopics(parsed);
        }//if
      });
    },
  
    importTopics: function(parsedTopics) {
      var self = Metamaps.Import;
  
      var x = -200;
      var y = -200;
      parsedTopics.forEach(function(topic) {
        self.createTopicWithParameters(
          topic.name, topic.metacode, topic.permission,
          topic.desc, topic.link, x, y
        );
  
        // update positions of topics
        x += 50;
        if (x > 200) {
          y += 50;
          x = -200;
        }//if
      });
    },
  
    parseTabbedString: function(text) {
  
negative.code:     Metamaps.Mappings.add(mapping);
  
      // this function also includes the creation of the topic in the database
      Metamaps.Topic.renderTopic(mapping, topic, true, true);
  
      Metamaps.Famous.viz.hideInstructions();
    },
  
    createSynapseWithParameters: function(description, category, permission,
                                          node1_id, node2_id) {
      var topic1 = Metamaps.Topics.where({import_id: node1_id});
      var topic2 = Metamaps.Topics.where({import_id: node2_id});
      var node1 = topic1.get('node');
      var node2 = topic2.get('node');
      // TODO check if topic1 and topic2 were sucessfully found...
  
      var synapse = new Metamaps.Backbone.Synapse({
        desc: description,
        category: category,
        permission: permission,
        node1_id: node1_id,
        node2_id: node2_id,
      });
  
      var mapping = new Metamaps.Backbone.Mapping({
        mappable_type: "Synapse",
        mappable_id: synapse.cid,
      });
  
      Metamaps.Synapse.renderSynapse(mapping, synapse, node1, node2, true);
    },
  };
  