MatejBransky / react-katex

Display math in TeX with KaTeX and ReactJS
https://codesandbox.io/s/github/MatejMazur/react-katex/tree/master/demo?fontsize=14&hidenavigation=1&module=%2Fsrc%2FExample.tsx&theme=dark
MIT License
147 stars 12 forks source link

Possible katex helper function #1

Closed judemanutd closed 5 years ago

judemanutd commented 5 years ago

I am currently using the talyssonoc/react-katex and wanted to know if this library had helper functions such as

I could not find any documentation for the same and wanted to know if it is possible,

MatejBransky commented 5 years ago

Hi, you can set all KaTeX options directly. It's in the documentation.

Why do you need katex.__parse?

judemanutd commented 5 years ago

@MatejBransky so I had a requirement where I am using draftjs and the user is allowed to type in rich text along with tex and I was rendering this on the fly by parsing through the text using regex and using renderToString() on the tex parts in order to get html which would then automatically be rendered by the browser.

MatejBransky commented 5 years ago

Then I think that you don't need this library for this purpose. You can use the KaTeX API directly. Look into the my code if you don't know how to use KaTeX with React. ;)