Contributing as part of the Informaticup 2025

hey @philippfromme we did not think about serializing the elements that should be copied to xml and stuck to this example where json serialization is used. With that you can serialize the tree that is stored in the diagram-js-clipboard(that is where our idea to use diagram-js orginated from). But we ran into problems reviving the tree and thus a bpmn-js focused solution is as you said probably the way to go.
Based on our current knowledge of the bpms-js framework and our understanding of the copy-paste-process we built a mvp. When testing different implementations we found it hard to manage the default diagram-js paste implementation beside our new one. Each one would override the clipboard and they would get in each others way if we tried to populate the bpmn-clipboard with the contents of the system-clipboard at the time of pasting. Finding a way around without changing things in the diagram-js paste implementation (which would probably break other project depending on that) seems kind of impossible for us at this time. For that reason the thought of another idea to populate the clipboard:
When looking at the actions a user takes when copy-pasting from another window:
1.copy in window a
2.switch to window b
3.paste in window b
We noticed that we could listen for the focus-event of the window and then try to populate the clipboard with the system-clipboards content. This would leave all copy logic intact if working in a single window and allow copying between them.