Function: paste()
Pastes the given data into the workspace, or the last copied ICopyable if no data is passed.
Param
copyData
The data to paste into the workspace.
Param
workspace
The workspace to paste the data into.
Param
coordinate
The location to paste the thing at.
Call Signature
function paste<T>(
copyData,
workspace,
coordinate?
): ICopyable<T> | null;
Defined in: packages/blockly/core/clipboard.ts:141
Paste a pasteable element into the given workspace.
This function does not perform any checks to ensure the paste is allowed, e.g. that the workspace is rendered or the block is pasteable. Such checks should be done before calling this function.
Type Parameters
| Type Parameter |
|---|
T extends ICopyData |
Parameters
| Parameter | Type | Description |
|---|---|---|
copyData | T | The data to paste into the workspace. |
workspace | WorkspaceSvg | The workspace to paste the data into. |
coordinate? | Coordinate | The location to paste the thing at. |
Returns
ICopyable<T> | null
The pasted thing if the paste was successful, null otherwise.
Call Signature
function paste():
| ICopyable<ICopyData>
| null;
Defined in: packages/blockly/core/clipboard.ts:152
Pastes the last copied ICopyable into the last copied-from workspace.
Returns
the pasted thing if the paste was successful, null otherwise.