It would be awesome if embedded playgrounds had a button/anchor to open the playground link in a new tab! Otherwise it seems we’d have to copy and paste the code into a new playground? Maybe could detect if loaded in an iframe and unhide a button for it?
That’s actually possible. But feels like it should be solved somewhere else. I assume you are talking about the documentation’s embedded playground. We do have a “open in a new tab” button, but i can understand if you tell me - it’s all the way down there, I want it next to the playground. That makes sense. We can add the button right nesxt to the close button, on top of the documentation. Would that work?
I think what Blake’s case is for forum-embedded playgrounds? For those I don’t see a way to open in a new tab
Yep playgrounds embedded in the forum is mainly what I was thinking about, like the one embedded above. Something similar to the way embedded CodePens have the “Open in Editor” button (if I recall correctly).
That way when embedded playgrounds are posted without also posting the link, it would still be easy to open the playground link by just pressing the button (rather than copying and pasting the code into a new playground).
A button next to the button that opens the forum in a new tab, for example, which would only be made visible if the playground is loaded in an iframe. Since opening the forum URL works in the embedded playground above, it seems that opening the playground’s URL would work as well.
CC @RaananW since I’m really replying to both of you at once.
And I’m just seating here wondering how this image became interactive all of a sudden!..
I had no idea you can embed a playground in the forum. Sure, makes sense to have the link at the bottom of the page. i’ll add that as a future task
Haha IDK if it’s officially supported. I just learned about it from a neat embedded demo posted a few days ago. LOL and it is hard to tell it’s a PG, not a screen shot or video.
There isn’t an icon/form for inserting it, but you can create the iframe tag like below and include it in posts manually. Thanks!
<iframe src="https://playground.babylonjs.com/#NF6EVB" width="800px" height="600px"></iframe>