1) https://github.com/mikenikles/html-to-react: Perhaps we can use this to convert the markdown html to react components, and perhaps avoid using dangerouslySetInnerHTML? This could open up several possibilities, including adding react components in the markdown (by adding appropriate functions in the processingInstructions array).
2) https://github.com/alexkuz/markdown-react-js: Instead of (or in addition to) converting markdown to html at compile time, we can do this "on the fly". In addition to allowing users to write markdown on the fly, it returns react components instead of html, and since it uses markdown-it and allows plugins, we should be able to create our own scratchblocks-plugin that would directly translate the scratchblocks-sections to scratchblocks-react-components (which in turn would be responsible for creating the scratchblocks-svg on-the-fly).
Two suggestions:
1) https://github.com/mikenikles/html-to-react: Perhaps we can use this to convert the markdown html to react components, and perhaps avoid using dangerouslySetInnerHTML? This could open up several possibilities, including adding react components in the markdown (by adding appropriate functions in the processingInstructions array).
2) https://github.com/alexkuz/markdown-react-js: Instead of (or in addition to) converting markdown to html at compile time, we can do this "on the fly". In addition to allowing users to write markdown on the fly, it returns react components instead of html, and since it uses markdown-it and allows plugins, we should be able to create our own scratchblocks-plugin that would directly translate the scratchblocks-sections to scratchblocks-react-components (which in turn would be responsible for creating the scratchblocks-svg on-the-fly).