We are using new clipboard API to implement the browser/operating system wide copy paste.
We have a set of components (Assume it like a flow charts which have connected div) and that is build from a simple json.
Our goal is to implement Copy and paste. We have a underlying JsON in hand, i tried to save the Json file in clipboard.
Now the real problem starts:
1: Copy and Paste is operating system wide, so how can i know that, currently copied element is json and that is what we needed to build the flow. Eg: a user can copy whatever they want, but i only want the data which my system can parse.
2: How generally these type of applications works, for example, on Slack, i copied a formatted markdown message into my clipboard and i pasted the same into a text editor, but i don't see any markdown command on the selected text, but somehow i pasted the same thing in slack, i got the same message which i copied earlier.
Is anyone have done Copy/Paste of components, Any help highly appreciated.