Learn how to implement copy, cut, and paste functionality in Foblex Flow. This example shows how to duplicate nodes (with their connections), remove selected elements, and insert them back into the diagram — all while maintaining consistent IDs and connections.
Copy/Paste makes your editor much more user-friendly, enabling workflows similar to standard desktop applications. In this example you will learn:
Clipboard content is stored in a local signal, and IDs are regenerated using generateGuid() to keep the graph consistent.
[component.html] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/advanced/copy-paste/copy-paste.html [component.ts] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/advanced/copy-paste/copy-paste.ts [component.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/advanced/copy-paste/copy-paste.scss [common.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/_flow-common.scss