Items can be created by using the new operator and added to the diagram by means of the addItem method. Items can be deleted by calling the removeItem method. There are shortcut methods provided by the diagram's Factory object that can be used to create an item and add it to the diagram with just one method call, for example createShapeNode and createDiagramLink.
Controlling Users' Actions
Users actions can be validated by handling various events, fired while items are being created, modified or deleted. The allowInplaceEdit property controls whether users are allowed to edit text by double clicking on items.