Migrate editor to Sandpack
chopfitzroy opened this issue · comments
Explore possibility of re-writing the editor to use Sandpack.
Would eliminate the risk of parsing MDX in the browser.
Additionally uses tools we are already invested in like Codemirror.
As it stands Sandpack will not support containers in the near future so how I was originally planning this will not be possible.
That being said there is still potential to use this and have a similar setup to what we have now and compile the MDX in the browser. This should in theory still be safer as it will be isolated to the
iframe and sanitized via the Codesandbox API's.
See here for more information on how Codesandbox handles environments.
See here for a live example of MDX compilation being done in a Codesandbox container environment.