From 651f05ebec66801bcba5208dc6d08535ac492c94 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Sat, 9 Oct 2021 15:35:43 +0800 Subject: [PATCH] doc: Update README.md --- README.md | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index db4dfd9b..0669fa40 100644 --- a/README.md +++ b/README.md @@ -58,8 +58,6 @@ type MarkdownPreviewProps = { This [`ReactMarkdownProps`](https://github.com/remarkjs/react-markdown/tree/02bac837bf141cdb8face360fb88be6fa33ab194#props) details. [Upgrade `react-markdown` v6](https://github.com/remarkjs/react-markdown/blob/15b4757082cf3f32a25eba0b8ea30baf751a8b40/changelog.md#600---2021-04-15) - - - `children` (`string`, default: `''`)\ Markdown to parse - `className` (`string?`)\ @@ -103,13 +101,33 @@ This [`ReactMarkdownProps`](https://github.com/remarkjs/react-markdown/tree/02ba Same as `transformLinkUri` but for images - `components` (`Object.`, default: `{}`)\ Object mapping tag names to React components -- `remarkPlugins` (`Array.`, default: `[]`)\ +- `remarkPlugins` (`Array.`, default: `[]`)\ List of [remark plugins](https://github.com/remarkjs/remark/blob/main/doc/plugins.md#list-of-plugins) to use. See the next section for examples on how to pass options -- `rehypePlugins` (`Array.`, default: `[]`)\ +- `rehypePlugins` (`Array.`, default: `[]`)\ List of [rehype plugins](https://github.com/rehypejs/rehype/blob/main/doc/plugins.md#list-of-plugins) to use. See the next section for examples on how to pass options +## Markdown Features + +### Supports for CSS Style + +Use HTML comments [``](https://github.com/jaywcjlove/rehype-attr) to let Markdown support style customization. + +```markdown +## Title + + +Markdown Supports **Style** +``` + +### Support for [GFM footnotes](https://github.blog/changelog/2021-09-30-footnotes-now-supported-in-markdown-fields/) + +```markdown +Here is a simple footnote[^1]. With some additional text after it. + +[^1]: My reference. +``` ## Development @@ -119,9 +137,8 @@ Runs the project in development mode. # Step 1, run first, # listen to the component compile and output the .js file # listen for compilation output type .d.ts file -npm run watch # listen to the component compile and output the .css file -npm run css:watch +npm run watch # Step 2, development mode, listen to compile preview website instance npm start ``` @@ -135,16 +152,15 @@ npm run build The build is minified and the filenames include the hashes. Your app is ready to be deployed! - ### Related If you need more features-rich Markdown Editor, you can use [@uiwjs/react-markdown-editor](https://github.com/uiwjs/react-markdown-editor) +- [@uiw/react-markdown-editor](https://github.com/uiwjs/react-markdown-editor): A markdown editor with preview, implemented with React.js and TypeScript. +- [@uiw/react-md-editor](https://github.com/uiwjs/react-md-editor): A simple markdown editor with preview, implemented with React.js and TypeScript. - [@uiw/react-textarea-code-editor](https://github.com/uiwjs/react-textarea-code-editor): A simple code editor with syntax highlighting. - [@uiw/react-codemirror](https://github.com/uiwjs/react-codemirror): CodeMirror component for React. @codemirror - [@uiw/react-monacoeditor](https://github.com/jaywcjlove/react-monacoeditor): Monaco Editor component for React. -- [@uiw/react-markdown-editor](https://github.com/uiwjs/react-markdown-editor): A markdown editor with preview, implemented with React.js and TypeScript. -- [@uiw/react-md-editor](https://github.com/uiwjs/react-md-editor): A simple markdown editor with preview, implemented with React.js and TypeScript. ## License