Search
DiagramView.pasteFromClipboard Method
See Also
 





Pastes diagram items from the clipboard.

Namespace: MindFusion.Diagramming
Package: DiagramView.js

 Syntax

JavaScript  Copy Code

function pasteFromClipboard (offsetX, offsetY, [systemClipboard, [unconnectedLinks]])

 Parameters

offsetX

Number. Horizontal offset of pasted items from their original positions.

offsetY

Number. Vertical offset of pasted items from their original positions.

systemClipboard
Optional.

Boolean. true to paste from the system clipboard, or false otherwise. The default value is false.

unconnectedLinks
Optional.

Boolean. true to allow pasting links whose origin or destination node has not been copied, or false otherwise. The default value is false.

 Remarks

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.

 See Also