Skip to main content

Home > @jsplumbtoolkit/copy-paste > Clipboard

Clipboard class

Offers methods to copy and paste data from/to a Toolkit instance. This class is abstract and is subclassed to concrete implementations by UI specific packages, of which currently there is only @jsplumbtoolkit/browser-ui-copy-paste. In the future if alternate renderers are written for the Toolkit it is expected that an implementation of the Clipboard would be one of the inclusions.

Signature:

export declare abstract class Clipboard 

Constructors

ConstructorModifiersDescription
(constructor)(toolkit)Constructs a new instance of the Clipboard class

Properties

PropertyModifiersTypeDescription
toolkitJsPlumbToolkit

Methods

MethodModifiersDescription
clear()Removes all entries from the clipboard.
copy(obj)Copy some set of objects into the clipboard.
copyCurrentSelection()Copies the contents of the associated Toolkit instance's current selection into the clipboard.
paste(options)Paste the clipboard's most recent entry, optionally removing it from the clipboard afterwards.
pasteCurrentSelection(options)Copies and pastes the contents of the associated Toolkit instance's current selection into the clipboard. This method is equivalent to calling copyCurrentSelection() first and then calling paste(..).