Skip to content

v3.25.0

Compare
Choose a tag to compare
@github-actions github-actions released this 01 Nov 08:11
· 55 commits to master since this release

Documentation v3.25.0: https://raw.githack.com/uiwjs/react-md-editor/7b6ad20/index.html
Comparing Changes: v3.24.1...v3.25.0

npm i @uiw/react-md-editor@3.25.0

Remove Code Highlight

The following example can help you exclude code highlighting code from being included in the bundle. @uiw/react-md-editor/nohighlight component does not contain the rehype-prism-plus code highlighting package, highlightEnable, showLineNumbers and highlight line functions will no longer work. (#586)

import React from "react";
import MDEditor from '@uiw/react-md-editor/nohighlight';

const code = `**Hello world!!!**
\`\`\`js
function demo() {}
\`\`\`
`

export default function App() {
  const [value, setValue] = React.useState(code);
  return (
    <div className="container">
      <MDEditor
        value={value}
        onChange={setValue}
      />
      <MDEditor.Markdown source={value} style={{ whiteSpace: 'pre-wrap' }} />
    </div>
  );
}