mathpix-markdown-it
                                
                                 mathpix-markdown-it copied to clipboard
                                
                                    mathpix-markdown-it copied to clipboard
                            
                            
                            
                        Not working with remix.run
Hi,
I'm trying to use mathpix-markdown-it with remix.run framework, but I get error:
 .
I "solved" it by just commenting out lines with errors, but then I get another error:
.
I "solved" it by just commenting out lines with errors, but then I get another error:
 I "solved" this one by adding this line to root.tsx:
I "solved" this one by adding this line to root.tsx:
 But then again I got another error:
But then again I got another error:
 .
.
I don't know what to do anymore.
Here is reproduceable: https://codesandbox.io/s/relaxed-torvalds-mknke?file=/app/routes/index.jsx
Hey, @JakovGlavac  I need to figure out why this isn't working for remix.run.
Maybe it's because you are using strict mode.
But you can use the approach described here https://github.com/Mathpix/mathpix-markdown-it/issues/95#issuecomment-760991632
Add it into Document function
        <script src={'https://cdn.jsdelivr.net/npm/[email protected]/es5/bundle.js'}/>
        <div dangerouslySetInnerHTML={ {
          __html: '<script>const global = window; const isLoaded = window.loadMathJax(); if (isLoaded) console.log(\'Styles loaded!\')</script>'
        } }/>
Then you can use it in your component :
          <div dangerouslySetInnerHTML={ {__html: window.markdownToHTML("\\(ax^2 + bx + c = 0\\)")}}/>
          <div dangerouslySetInnerHTML={ {__html: window.markdownToHTML("$x = \\frac { - b \\pm \\sqrt { b ^ { 2 } - 4 a c } } { 2 a }$")}}/>
Result
