Skip to main content

Clipboard

Offers methods to copy and paste data from/to a VisuallyJs model instance. This class is abstract and is subclassed to concrete implementations by UI specific packages. In the future if alternate renderers are written for the VisuallyJs model it is expected that an implementation of the Clipboard would be one of the inclusions.

Extended by

Methods

clear()

clear(): void

Removes all entries from the clipboard.

Returns

void


copy()

copy(obj): void

Copy some set of objects into the clipboard.

Parameters

obj

The object, or objects, to copy in to the clipboard.

Base | VisuallyJsSelection | Base[] | Path

Returns

void


copyCurrentSelection()

copyCurrentSelection(): void

Copies the contents of the associated model instance's current selection into the clipboard.

Returns

void


paste()

paste(options?): ClonedSet

Paste the clipboard's most recent entry, optionally removing it from the clipboard afterwards.

Parameters

options?

PasteOptions

Options for the paste.

Returns

ClonedSet


pasteCurrentSelection()

pasteCurrentSelection(options?): ClonedSet

Copies and pastes the contents of the associated model instance's current selection into the clipboard. This method is equivalent to calling copyCurrentSelection() first and then calling paste(..).

Parameters

options?

PasteOptions

Options for the paste.

Returns

ClonedSet