filearts / plunker_www

The public-facing website for http://plnkr.co
MIT License
289 stars 94 forks source link

old embed view #87

Open MartinMuzatko opened 8 years ago

MartinMuzatko commented 8 years ago

Hello there! I hope I'm writing this to the correct repo.

Recently, the plunker embed mode shows also the code. Which I dislike. I only want to embed plunks for demos and have a button (like before) to switch to source. Is there a possibility to get back the old view or change it in some settings?

thanks a lot in advance!

MartinMuzatko commented 8 years ago

Update: I found this: https://groups.google.com/forum/#!topic/plunker/p-dwrB3pQwU

Please add settings for embedding views

ggoodman commented 8 years ago

I've been hearing this general request in a few different ways. The new embed is certainly heavier than the old one; the old embed contained no javascript at all.

I think this presents an interesting opportunity to take the framework from the old embed and use it as a no-js view for embeds that can be 'upgraded' at runtime to the full embed experience.

Thoughts?

MartinMuzatko commented 8 years ago

I usually use this for tiny embeds. A full editing experience wouldn't fit into a ~500x600px iframe demo

See this for example: http://happy-css.com/lessons/riotjs/reusable-components-observing-events/#creating-our-event-api

My demo barely fits there ;) I always provide a link below the embedded plunker, to directly fiddle with it in fullscreen.

So it really depends on the usecase. I'd love to have a lightweight embedding mechanism. Or like in Codepen, you can share different links for full, editor and details. Having an almost borderless integration would be what I need. with an icon of plunker in the corner at least. The old version with the bar on the top was okay, since you can switch between code and preview.

Actually, this is what I did, when migrating to the new embeds:

<iframe width="<?=$attr['width']?>" height="<?=$attr['height']+100?>" src="<?=$attr['src']?>?show=preview"></iframe>

Most of the demos didn't fit anymore, so I had to add 100~ pixels to the height at least.

Thanks for your reply @ggoodman.