kodeklubben / codeclub-viewer

A viewer to display codeclub lessons
4 stars 17 forks source link

Parse lesson content to react components #145

Open NorwegianKiwi opened 8 years ago

NorwegianKiwi commented 8 years ago

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).

arve0 commented 8 years ago

Suggestion for title: "Parse lesson content to react components"