mdx-editor / editor

A rich text editor React component for markdown
https://mdxeditor.dev
MIT License
1.65k stars 135 forks source link

LaTeX support? #59

Open Tapwatero opened 11 months ago

Tapwatero commented 11 months ago

Hello, I am wondering if MDX supports LaTeX markdown for mathematics - if so I would appreciate documentation or a link to such documentation as I could not find it - if not the implemenation would not go unused.

petyosi commented 11 months ago

You're not wrong, there's no such support at the moment. This has been requested before - I wonder how would you like to see the editing experience? To clarify what I mean, rendering the resulting latex is pretty much straightforward, but how would you like to get the editing going - like some form of a source code?

Tapwatero commented 11 months ago

I think latex needs to be writable not as a toolbar button, so I could write the maths and when im off the line or something along those lines - it would be rendered. Let me know if this is not clear enough, I don't know how to explain it

JojoDevel commented 8 months ago

Any progress here?

hahhen commented 6 months ago

Hey, if you're still searching for it, you should try using MathLive inside the editor, I just did that. Make a component with a radix dialog, a button with the same classes as the toolbar button with an svg icon inside it and insert a inside it. After you're done, just get the value of the math-field and insertMarkdown it into the editor. Check their documentation on their website, it's a pretty good LaTeX editor

tumidi commented 5 months ago

you should try using MathLive inside the editor, I just did that.

MathLive was the first thing coming to my mind, too. Do you happen to have an example of integrating MathLive with MDXEditor?

hahhen commented 5 months ago

you should try using MathLive inside the editor, I just did that.

MathLive was the first thing coming to my mind, too. Do you happen to have an example of integrating MathLive with MDXEditor?

Actually, yes! You can check my github, it's in https://github.com/hahhen/forum_teste/tree/main/src/components/editor

Actually, it's not a proper MDXEditor plugin, since it doesn't implement the plugin functionalities, but it works well enough