lostintangent / codeswing

VS Code extension for building web applications ("swings") using a interactive and editor-integrated coding environment
https://aka.ms/codeswing
MIT License
977 stars 46 forks source link

Feature Request - Import from CodePen URL #53

Closed Pawper closed 2 years ago

Pawper commented 2 years ago

It would be awesome to import from a CodePen URL.

lostintangent commented 2 years ago

Unfortunately, I'm not sure if CodePen has an API to make this possible today. However, what you can do is:

  1. Export a pen to a GitHub Gist
  2. Install the GistPad extension and sign into the same GitHub identity you used when exporting the pen
  3. You'll then see the pen in the Gists tree view, and if you open it, it will detect that you have CodeSwing installed, and open the swing editor

The nice thing about that flow, is that you can also create new swings in VS Code and store them in gists. That way, you have your swings more easily shareable (Details).

lostintangent commented 2 years ago

After looking into this more, there unfortunately isn't an API to support this scenario, and so I'm going to close it as non actionable. That said, per my previous comment, the workaround is to expose a pen to a gist and then use GistPad to open it. Thanks!