This is a minimalist HTML and JavaScript skeleton of the GoJS Sample blockEditor.html. It was automatically generated from a button on the sample page, and does not contain the full HTML. It is intended as a starting point to adapt for your own usage. For many samples, you may need to inspect the full source on Github and copy other files or scripts.

This text is displayed if your browser does not support the Canvas HTML element.

Double-click in the background to create a new node. Create groups by selecting nodes and invoking Ctrl-G; Ctrl-Shift-G to ungroup a selected group. A selected node will have four orange triangles that when clicked will automatically copy the node and link to it. Use the context menu to change the shape, color, thickness, and dashed-ness.

Links can be drawn by dragging from the side of each node. A selected link can be reconnected by dragging an end handle. Use the context menu to change the color, thickness, dashed-ness, and which side the link should connect with. Press the F2 key to start editing the label of a selected link.

GoJS version 2.2.6. Copyright 1998-2022 by Northwoods Software.

View this sample page's source on GitHub