clipboard.paste() function
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.
Signature:
export declare function paste<T extends ICopyData>(copyData: T, workspace: WorkspaceSvg, coordinate?: Coordinate): ICopyable<T> | null;
Parameters
| Parameter | Type | Description |
|---|---|---|
| copyData | T | The data to paste into the workspace. |
| workspace | WorkspaceSvg | The workspace to paste the data into. |
| coordinate | Coordinate | (Optional) The location to paste the thing at. |
Returns:
ICopyable<T> | null
The pasted thing if the paste was successful, null otherwise.