This example demonstrates a custom CommandHandler. It uses localStorage as the repository for the clipboard, rather than an in-memory global variable. It is defined in its own file, as LocalStorageCommandHandler.js.

Try copying and pasting between the above Diagrams, or between tabs/windows that contain Diagrams using LocalStorageCommandHandler. Note that when copying and pasting between Diagrams, it will work best if they have similar templates.

加入 GoJS 交流群
GoJS 交流群 (769862113)