ericadamski / vscode-carbon_now_sh

A Code package to open the current editor content in carbon.now.sh
https://marketplace.visualstudio.com/items?itemName=ericadamski.carbon-now-sh
36 stars 14 forks source link

Bring carbon.now.sh inside code #12

Open mittalyashu opened 6 years ago

mittalyashu commented 6 years ago

You'll be redirected to carbon.now.sh with your selected code populating the textarea.

Can you bring all the features of carbon directly inside code?

ericadamski commented 6 years ago

@mittalyashu What does that look like for you? I am not 100% sure but I believe the web navigation capabilities of VSCode are more closed off than Atom which makes dealing with external WebViews more difficult.

None the less, I would like to try! What did you have in mind?

mittalyashu commented 6 years ago

I believe the web navigation capabilities of VSCode are more closed off than Atom which makes dealing with external WebViews more difficult.

I am not sure what happens in the underhood of atom and code.

But my point is that the carbon.now.sh is very awesome but it hard to do the ctrl + shift + p select and the waiting to open a browser and then download the image every time.

I have some idea, how you can do it.

ericadamski commented 6 years ago

@mittalyashu I would love to hear your ideas! Anything to make this extension better for people!

mittalyashu commented 6 years ago

Here's what you can do:

  1. Refer this extension.
  2. As code doesn't have that much power for configuring an extension just like the atom, in that case, you can create some settings (specific to this extension) that we can use in settings.json.
  3. Use carbon.now.sh API.
  4. Open carbon.now.sh website directly inside the code.
  5. Open standalone window (browser) instead of the whole browser.
  6. Right-click on the file in the tree-view and getting the screenshot of the whole file.

It's hard to type every detail, so if you want we can get over a call and I can explain each of this option in detail.

ericadamski commented 6 years ago

We can totally hope on a call! I will put some issue in for some things like opening the URL in a WebView inside of code.

mittalyashu commented 6 years ago

Okay, just DM me.

We can see what time fits for the talk.

ericadamski commented 6 years ago

The extent of the WebView API does not fulfill the requirements necessary to run carbon inside of vscode.

screen shot 2018-06-28 at 8 13 31 am

mittalyashu commented 6 years ago

What about the 6th option?

ericadamski commented 6 years ago

That is definitely an option! I don't have time to get to it right now but I can add it as a specific issue!

willstocks commented 5 years ago

I’d be super interested to know if there’s a way to handle “Carbon”’ing a section of code offline rather than having to open out a browser window! Don’t know if that’s even possible or not, to almost “build it into” Code, in a similar manner to Polacode?

ericadamski commented 5 years ago

@willstocks-tech I am not sure what would be involved if we were to pull carbon and make it offline ready. It might require some PR's into the main Carbon repo to take it offline first. I am totally open to thoughts on how to do this! 💬

Seems there is already offline support https://github.com/dawnlabs/carbon/pull/455 maybe we could make use of this