paste

Pastes the content of the internal diagram clipboard.

Example - copy and paste Diagram elements

<button id="copyBtn">Copy Selected Elements</button>
<button id="pasteBtn">Paste</button>
<div id="diagram"></div>
<script>
  $("#copyBtn").on("click", function(){
    var diagram = $("#diagram").getKendoDiagram();
    diagram.copy();
  });
  $("#pasteBtn").on("click", function(){
    var diagram = $("#diagram").getKendoDiagram();
    diagram.paste();
  });
  $("#diagram").kendoDiagram({
    shapes:[
      {
        id:"1",
        content:{
          text: "State 1"
        },
        x: 20,
        y: 20
      },
      {
        id:"2",
        content: {
          text: "State 2"
        },
        x: 160,
        y: 20
      }
    ],
    connections:[
      {
        from: "1",
        to: "2"
      }
    ]
  });
</script>
In this article