myDiagram.findNodeForData(newdata);
        if (newnode) myDiagram.select(newnode);
        // clear the GoJS clipboard
        myDiagram.commandHandler.copyToClipboard(null);
      } else {
        // If the clipbooard does not contain anything, paste from GoJS instead
        const commandHandler = myDiagram.commandHandler;
        if (commandHandler.canPasteSelection()) commandHandler.pasteSelection();
      }
    });

    myDiagram.model = new go.GraphLinksModel(
      [
        { key: 1, text: 'Alpha',