Carbon: Embedding carbon window as HTML element

Created on 28 Jan 2018  路  11Comments  路  Source: carbon-app/carbon

I couldn't see if this was already supported but it'd be lush if we could embed the window as a HTML element. This would then allow for prettier documentation in APIs where one could also select the code snippet in an easier manner.

Thoughts?

integrations

Most helpful comment

I would love this! A replacement for all the gists I make for Medium

All 11 comments

I would love this! A replacement for all the gists I make for Medium

You would probably want to import it via an iframe versus creating an element for it though in order to avoid people inadvertently messing around with the styles with whatever css is on their site

I was thinking the same. The problem could also be solved by providing a permalink to the image instead of an embedded iFrame. SO instead of sharing as tweet or downloading the image, it would be great to provide a gist id and also a query parameter, to get the image only.

To be able to properly embed these code snippets into Medium articles, they should be available as an www.embed.ly extension. Here are a few pointers how this works:

I would absolutely love this feature! As I'm writing a lot of tutorials, there are a few more ideas for extra annotations I'd have for these kinds of code blocks:

  1. Annotate the code snippets with a file name and the ability to link them to an existing file on GitHub. Often times when reading tutorials, it is not quite clear _where_ in the specified file the code needs to be pasted. So, it would be a great help if the reader could see the "final" result in a linked file. (You can see what I mean in the tutorials we created for How to GraphQL, e.g. here)
  2. Similarly, if the code snippet contains code to be run in the terminal, it should be possible to annotate the code snippet with the path to the directory in which the command should be ran.
  3. There should be a copy-button that allows to directly copy the entire code from the block.

I think these would be tremendous helps for tutorial writers! At Graphcool, we'd be happy to collaborate on these features :)

I'll be watching. I just spent around an hour looking for a better way to style and embed code in my page that would basically replicate the beautiful styling you created, but still allow the code to be copied. As much as I love the image feature, I need those snippets to be available to copy. Watching this repo, keep up the great work!

Hey, guys, I'm excited to do a pull request for this feature but before I get started it would be great if anyone can give me a green flag.

@ameerthehacker, we do not have any active development on this issue, although we would appreciate it if you would work with @nikolasburk on this, since Nikolas has some ideas about how to implement this functionality with Embed.ly :smile: (and we think that is a good direction to take this feature).

If you could, push up work onto a branch early for feedback, and we encourage collaboration (:

Thanks @mfix22. @nikolasburk are you interested to work with me? It would be great if you are ready for that.

@mfix22 I have checked out embed.ly and it is not free. You can checkout the pricing here http://embed.ly/pricing

~@ameerthehacker do you have other ideas for a free solution?~

@ameerthehacker Looks like we can become an Embeddly provider for free: http://embed.ly/providers/new

Hey all, issues marked "Integrations" are being closed and theirs discussions moved to https://github.com/dawnlabs/carbon/issues/358. With many requests for new features, this allows the Carbon team to prioritize which to support first 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shaonkabir8 picture shaonkabir8  路  5Comments

vmitchell85 picture vmitchell85  路  3Comments

UlisesGascon picture UlisesGascon  路  3Comments

LGTMXD picture LGTMXD  路  4Comments

jgierer12 picture jgierer12  路  5Comments