Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] option to render React node instead of HTML #272

Closed
AustenLamacraft opened this issue Oct 1, 2022 · 2 comments
Closed
Labels
enhancement New feature or request

Comments

@AustenLamacraft
Copy link

AustenLamacraft commented Oct 1, 2022

I'd like to render the preview using better-react-mathjax, which uses a component MathJax (the nice thing about this approach is that it takes care of the styles). Thus it would be good to have the option of rendering a React node instead of HTML in renderHTML.

@AustenLamacraft AustenLamacraft added the enhancement New feature or request label Oct 1, 2022
@AustenLamacraft AustenLamacraft changed the title [Feature Request] [Feature request:] option to render React node instead of HTML Oct 1, 2022
@AustenLamacraft AustenLamacraft changed the title [Feature request:] option to render React node instead of HTML [Feature request] option to render React node instead of HTML Oct 1, 2022
@AustenLamacraft
Copy link
Author

Turns out wrapping the whole editor component in <MathJax>...</MathJax> was all I needed (the editor text doesn't render)

@sylingd
Copy link
Collaborator

sylingd commented Oct 3, 2022

https://codesandbox.io/s/rmel-demo-ref-in-function-component-u04gb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants