New node added to the diagram from pallete

Hello im trying to catch the event on the new added node to the diagram when i drag something from the pallete so i can give an initial configuration for that node and send it to the database. which is the best way for doing that? thanks

Implement an “ExternalObjectsDropped” DiagramEvent listener.

You will want to modify the node data object(s) in the model, by calling Model.set. If you search the samples for example uses, it appears that it is more commonly implemented in order to delete existing or insert additional nodes and links.

Thanks for your quick answer