Stay organized with collections
Save and categorize content based on your preferences.
blockly > BlockSvg > toCopyData
BlockSvg.toCopyData() method
Encode a block for copying.
Signature:
toCopyData(): BlockCopyData | null;
Returns:
BlockCopyData | null
Copy metadata, or null if the block is an insertion marker.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-16 UTC."],[[["The `rendered` property of the `BlockSvg` class indicates whether the block is rendered as an SVG, which is always true in this case."],["It is a read-only property with a constant value of `true`, confirming that `BlockSvg` instances are rendered using SVG."]]],["The `toCopyData()` method, part of the `BlockSvg` class, encodes a block for copying. It returns either `BlockCopyData`, containing copy metadata, or `null`. A `null` return value signifies that the block is an insertion marker. This method's primary action is to prepare a block for duplication, distinguishing between regular blocks and insertion markers. The output indicates the data structure that contains the necessary information for the copy.\n"]]