Skip to content

Commit

Permalink
doc: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Aug 28, 2021
1 parent e6bb1fd commit 00f575f
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,33 +354,34 @@ Use examples in [nextjs](https://nextjs.org/). [#52](https://github.com/uiwjs/re

```bash
npm install next-remove-imports
npm install @uiw/react-md-editor@v3.6.0
```

```js
// next.config.js
const removeImports = require('next-remove-imports')();

module.exports = removeImports({});
```

```jsx
// pages/index.js
import Head from 'next/head'
import MDEditor from '@uiw/react-md-editor';
import '@uiw/react-md-editor/dist/markdown-editor.css'
import '@uiw/react-markdown-preview/dist/markdown.css';
import "@uiw/react-md-editor/markdown-editor.css";
import "@uiw/react-markdown-preview/markdown.css";
import dynamic from "next/dynamic";

const MDEditor = dynamic(
() => import("@uiw/react-md-editor").then((mod) => mod.default),
{ ssr: false }
);

export default function Home() {
function HomePage() {
return (
<div>
<Head>
<title>Create Next App</title>
<meta name="description" content="Generated by create next app" />
</Head>
<MDEditor value="**Hello world!!!**" />
</div>
)
);
}

export default HomePage;
```

### Props
Expand Down

1 comment on commit 00f575f

@vercel
Copy link

@vercel vercel bot commented on 00f575f Aug 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.