Pastes diagram items from the clipboard.
Namespace: MindFusion.Diagramming
Package: DiagramView.js
JavaScript Copy Code |
---|
function pasteFromClipboard (offsetX, offsetY, [systemClipboard, [unconnectedLinks]]) |
Number. Horizontal offset of pasted items from their original positions.
Number. Vertical offset of pasted items from their original positions.
Boolean. true to paste from the system clipboard, or false otherwise. The default value is false.
Boolean. true to allow pasting links whose origin or destination node has not been copied, or false otherwise. The default value is false.
The diagram control maintains its own local clipboard and items are copied to it by default. If you specify true for the systemClipboard argument and running under browsers that allow access to the system clipboard, the items are copied to the system clipboard; in all other cases they are copied to the local clipboard.
Due to Navigator.clipboard API being asynchronous, pasted items are not available immediately after calling this method with systemClipboard enabled. You will be able to access them only after nodePasted and linkPasted events are raised.