The wrapping.html example demonstrates this. To have word wrapping HTML labels must be enabled:



 graph.setHtmlLabels(true);



And the whiteSpace style must be set to "wrap":



var v1 = graph.insertVertex(parent, null, 'Cum Caesar vidisset, portum plenum esse, iuxta navigavit.', 20, 20, 100, 70, 'whiteSpace=wrap;');