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

How can I custom renderer tag? #1017

Open
dribble-njr opened this issue Mar 26, 2024 · 0 comments
Open

How can I custom renderer tag? #1017

dribble-njr opened this issue Mar 26, 2024 · 0 comments

Comments

@dribble-njr
Copy link

I am trying to implement a blog with chakra-ui and markdown-it.

Now I can parse markdown file to HTML with markdown-it, and I renderer as normal HTML tag like <h1> without any style. But I want to custom style with chakra-ui instead of write CSS code.

How can I costom HTML tag to chakra-ui components. It seems like:

## h2
<Heading as={"h2"}>{...}</Heading>

I am trying to change md.renderer.rules but I doesn't work. So does any other way to impletment it.

Thanks in advance.

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

1 participant