sandpack
sandpack copied to clipboard
Feature request: Docusaurus plugin
Tell us how you think we can improve Sandpack
In order to improve community adoption, we could spend more time building an official plugin for Docusarus. Actually, we have a very draft version of it as it's available on Sandpack docs, so it would need to support more features and write proper documentation.
What is this feature?
TBD
How would your idea work?
TBD
Do you have any examples of how you would like to see us implement it?
TBD
I took, badly butchered your "very draft" version, and released it to virtuoso.dev (source). Hope you're ok with that, but let me know if this goes against a certain license.
Here are all the hacks I had to do:
Theming was off for obvious reasons. It would be great if the styling of the editor could pick those colors, that would also solve the theme switch automatically.
I had to do some code block annotations to support different dependencies. I am thinking that this could be made reusable through specifying presets in themeConfig. I did not really do that properly in my fork, because hard-coding those works for me.
The biggest limitation I am facing is that, unlike the previous live editor I had, this one can't be (easily?) made to work with a local package. I used Docusaurus for local development preview, and it would be great if this workflow is supported better.
If there's anything I can help with, let me know.
Thanks @petyosi, we'll take your feedback into consideration, indeed very useful. No worries about the license thing, you're free to use it as you want.