title: How to work with mxgraph events
body: <p>I am new working with mxgraph in javascript and have some specific questions on how to use events from the graph. There are two basic scenarios that I am interested to work with and understand better:</p>
  
  <p>1) I am interested to add vertices using the drag-and-drop mechanisms in the examples (i.e. using mxgraph toolbar). For this, I want receive an event BEFORE the node is added to the graph to be able to do two things before the "cells added" event is fired:</p>
  
  <p>a) Use logic incorporate data for the vertex (i.e. timestamp)</p>
  
  <p>b) Be able to assign a custom id to each vertex</p>
  
  <p>Could you please be able to help me understand how to handle this case? I have been looking at the online docs and cannot see a very straightforward description of how events actually work from "A to B".</p>
  
  <p>Thanks a lot</p>