Replies: 2 comments 2 replies
-
I'm wondering if something like this would work. So, instead of you implementing this screenshot mechanism on your website application, you could implement it inside sandpack sandbox, which would capture the whole iframe content, and then you can send the data back using post-message between the iframe and main app. Does it make sense? |
Beta Was this translation helpful? Give feedback.
2 replies
-
This is interesting. Any progress here? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
I am building a dashboard app that runs Sandpack's preview as a component block within each dashboard.
One of the requirements for the dashboard app is to have preview image for each dashboard, so I have implemented
html2canvas
in order to capture an image of the Sandpack previews but I quickly figured out that this isn't really working since theiframe
runs on a different domain."host the bundler..."
Well, I did host the bundler on a subdomain on my frontend app, but still getting the same result, an empty image without the iframe content.
Is the a way to capture a screenshot of the iframe content? I've really tried it all and could not figure out a way to do it.
Beta Was this translation helpful? Give feedback.
All reactions