v4.0.0
Documentation v4.0.0: https://raw.githack.com/uiwjs/react-markdown-preview/05817c5/index.html
Comparing Changes: v3.5.1...v4.0.0
- 🐝 refactor: replace dependency @mapbox/rehype-prism -> rehype-prism-plus 47a681c @jaywcjlove
- 🌟 feat: support dark-mode style. 7778d58 @jaywcjlove
- 🌍 website: add dart mode change. 88d0c91 @jaywcjlove
- 🌍 website: udpate website style. cad7bee @jaywcjlove
- 📖 doc: Update README.md 800169f @jaywcjlove
- 💄 chore: update workflows cofnig. a3728ac @jaywcjlove
npm i @uiw/[email protected]
Support dark-mode/night-mode
By default, the dark-mode
is automatically switched according to the system. If you need to switch manually, just set the data-color-mode="dark"
parameter for body.
<html data-color-mode="dark">
document.documentElement.setAttribute('data-color-mode', 'dark')
document.documentElement.setAttribute('data-color-mode', 'light')
Inherit custom color variables by adding .wmde-markdown-var
selector.
const Demo = () => {
return (
<div>
<div className="wmde-markdown-var"> </div>
<MarkdownPreview source="Hello World!" />
</div>
)
}