Closed heyngra closed 1 year ago
Thanks for your question!
You can implement like this: https://stackblitz.com/edit/svelte-exmarkdown-custom-component?file=src%2FApp.svelte
rehype-raw
module as rehypePlugin.Warning There are a few things to keep in mind.
- When setting up a renderer for a plugin, the keys must be all lowercase
- Component properties must be lowercased as well
- You cannot use self-closing syntax like
<CustomButton/>
Will check later on if it works fine, if so, then I'll close this issue! Thanks a lot!
Hey, I have a question, because I tried to implement it, but I can't figure it out. Is there any way, to add custom components to the svelte-exmarkdown?
Lets imagine we have h1 text called "Test". You would type it normally as
But is there a way to f.e add a button below, that acts like a svelte component, from the text itself? For example
(So the user can type this and server can import these components if necessary)