getting the "component props" in markdown #1253
-
so i have this use case in my app where i wanna check if the content has a particular property (say startsWith "!!!note") - if yes, return a callout kinda component with the rest of the content. so on creating the custom component, i get the props item, im able to convert the whole thing to text, but that loses all the links in it. Thanks : ) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Welcome @Elon-Mask12! 👋 It sounds like you are looking for https://github.com/remarkjs/remark-directive :::note{attribute=value}
inner content
::: and yes it can have attributes and inner content. |
Beta Was this translation helpful? Give feedback.
Sorry about the late reply been a bit busy lately.
I did a bit of searching using the links you shared, and thanks a ton i managed to find something.
Incase anyones interested: