Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedding carbon window as HTML element #179

Closed
rehatkathuria opened this issue Jan 28, 2018 · 11 comments
Closed

Embedding carbon window as HTML element #179

rehatkathuria opened this issue Jan 28, 2018 · 11 comments
Assignees
Labels
integrations All issues marked with this will be moved #358. Will happily accept PRs

Comments

@rehatkathuria
Copy link

rehatkathuria commented Jan 28, 2018

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?

@rehatkathuria rehatkathuria changed the title Embedding carbon window as HTML Embedding carbon window as HTML element Jan 28, 2018
@mfix22 mfix22 self-assigned this Jan 28, 2018
@cgatian
Copy link

cgatian commented Feb 3, 2018

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

@codeWonderland
Copy link

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

@MartinSeeler
Copy link

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.

@mfix22 mfix22 added the integrations All issues marked with this will be moved #358. Will happily accept PRs label Feb 6, 2018
@nikolasburk
Copy link

nikolasburk commented Feb 7, 2018

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 :)

@sheldonhull
Copy link

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!

@ameerthehacker
Copy link

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.

@mfix22
Copy link
Contributor

mfix22 commented Feb 27, 2018

@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 😄 (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 (:

@ameerthehacker
Copy link

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

@ameerthehacker
Copy link

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

@mfix22
Copy link
Contributor

mfix22 commented Mar 4, 2018

@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

@mfix22
Copy link
Contributor

mfix22 commented May 5, 2018

Hey all, issues marked "Integrations" are being closed and theirs discussions moved to #358. With many requests for new features, this allows the Carbon team to prioritize which to support first 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrations All issues marked with this will be moved #358. Will happily accept PRs
Projects
None yet
Development

No branches or pull requests

8 participants