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

Feliz.Markdown plug-in support #572

Open
dgrimmin opened this issue Apr 2, 2023 · 2 comments
Open

Feliz.Markdown plug-in support #572

dgrimmin opened this issue Apr 2, 2023 · 2 comments

Comments

@dgrimmin
Copy link

dgrimmin commented Apr 2, 2023

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

@Zaid-Ajaj
Copy link
Owner

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.

@dgrimmin
Copy link
Author

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?

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

No branches or pull requests

2 participants