Get Compiled Code #409
Unanswered
alexanderbluhm
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hey @alexanderbluhm, I don't think it's possible now. Due to CORS restriction, you won't be able to access the iframe context and copy the content. But I think we can implement an event in the Sandpack client to retrieve the iframe content. What do you think @DeMoorJasper? Can you see any potential problem implementing this? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am using Sandpack for some React templates and I want to offer my users support to copy the compiled HTML from my React templates.
Is there any hook or property to get access to the code that is passed to
<SandpackPreview />
?Expressed as code I want something like this:
Is there any possibility to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions