-
-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
I could not integrate Tailwind CSS with MarkdownPreview.
I am trying to provide a style from TailwindCSS for each heading. It works fine when add the html manually or another markdown editor, but when it is provided via MarkdownPreview, I realised MarkdownPreview style overrides what I am trying to achieve.
Is there any way of handling styles from CSS frameworks?
<article className="prose prose-h2:text-xl prose-h2:font-medium prose-h2:text-gray-900">
<MarkdownPreview
source={`## h2`}
wrapperElement={{
"data-color-mode": "light",
className: "prose prose-h2:text-xl prose-h2:font-medium prose-h2:text-gray-900"
}}
rehypeRewrite={(node, index, parent) => {
if (node.tagName === "a" && parent && /^h(1|2|3|4|5|6)/.test(parent.tagName)) {
parent.children = parent.children.slice(1)
}
}} />
</article>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels