Skip to content

v4.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 14 Mar 10:57
· 205 commits to master since this release

Documentation v4.0.0: https://raw.githack.com/uiwjs/react-markdown-preview/05817c5/index.html
Comparing Changes: v3.5.1...v4.0.0

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>
  )
}