Hello. I want to allow users to copy Webflow components from my app, so they can paste them into their Webflow sites. Copying and pasting Webflow components only work when the clipboard data type is application/json. I am using a plugin to copy text to clipboard for another use case. But I can’t figure out how to structure the text data in application/json format when copied to clipboard. I also tried a JSON .stringify plugin but the string was not able to be copied to the clipboard.
It appears that way. I pasted the JSON array into your plugin, created a workflow on button click, added a workflow step with a copy to clipboard plugin, and selected the ID of the JSON.stringify element to paste to clipboard. See attached. Not sure if this is the right way to do this.
After clicking the button and paste to the following tool, it appears to be null:
Thanks @GH5T I might’ve been using your plugin for the wrong purpose though. The JSON array is now being copied to clipboard successfully, but the data type is text/plain instead of the application/json that I need… But your plugin might be useful for another use case of mine, so thanks again
I can make it output as json as too. But the idea was the take JSON data then put it into plain text format (if parsed). What do you need achieved and I’ll add that functionality.
Oh that’s awesome! Basically when I copy a component in Webflow it’s copied to clipboard as application/json… You can see this when I paste the into a clipboard inspector:
Basically, this will JSON will be in plain text format in my Bubble app. Then when the user clicks copy it would be copied to the clipboard in the same format as from Webflow, so the user can then paste the JSON component into their Webflow project.