Feliz
Feliz copied to clipboard
Feliz.Markdown plug-in support
Dear Zaid,
For some time now, I have been thinking about how to render math with Feliz.Markdown. I got my inspiration from https://levelup.gitconnected.com/adding-katex-and-markdown-in-react-7b70694004ef . Could you comment on the way to achieve this?
All the best, Dennis
Hi @dgrimmin I've looked briefly at the article. I think it is already doable with Feliz.Markdown
because you can override how elements are rendered to ReactElement
using markdown.components.{<elementRenderer>}
where elementRenderer
is a function that takes information about the element and let's you choose what ReactElement
to render.
Thank you for your time Zaid.
This reminds me of a part of the source code of your Feliz website, where you have a part named codeBlockRenderer. That is basically the part that needs to be adapted for the rendering is what you are saying if I understand correctly. How would you go about instructing that part of your code to translate the raw text to math react-style? Would it require writing bindings for Katex?