Open devUserContact opened 3 months ago
you can use https://github.com/rehypejs/rehype-external-links and set option target to set target attr for external link.
like this (should work but I haven't try)
import rehypeExternalLinks from 'rehype-external-links'
import SolidjsMarkdown from 'solidjs-markdown'
import { render } from 'solid-js/web'
render(
() => (
<SolidjsMarkdown
rehypePlugins={[
[rehypeExternalLinks, { target: "_blank" }]
]}
>
# Hello, * world * !
</SolidjsMarkdown>
),
document.querySelector('#app')
)
maybe add more example later
My markdown is rendering well. However, I checked the provided example and I was not able to find anything beyond simply rendering the markdown 'as is'.
Thanks in advance, best