Skip to content

Commit 4812deb

Browse files
committed
docs: 更新使用指南和开发指南
1 parent fe865f9 commit 4812deb

File tree

1 file changed

+44
-31
lines changed

1 file changed

+44
-31
lines changed

README.md

Lines changed: 44 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,59 @@
1-
<div align="center">
2-
<a href="https://mdnice.com">
3-
<img width="200" src="./logo.png"/>
4-
</a>
5-
</div>
6-
<h1 align="center">Markdown Nice</h1>
7-
<p align="center"><img src="https://api.travis-ci.org/zhning12/markdown-nice.svg?branch=master"></p>
1+
# markdown-nice
82

9-
## 简介
3+
## usage
104

11-
- 支持自定义样式的 Markdown 编辑器
12-
- 支持微信公众号排版
13-
- 支持知乎、稀土掘金、博客园和CSDN等一系列平台
14-
- 内容和自定义样式浏览器中实时保存
15-
- 支持上传图片、脚注、公式
16-
- 欢迎[在线使用](https://mdnice.com/)
5+
目前仅支持 React
176

18-
## 示例
7+
1、安装 markdown-nice
198

20-
- 橙心:[终于等到你,公众号排版神器](https://mp.weixin.qq.com/s/raFgkqlV5hZmrXiEWVAyfQ)
21-
- 姹紫:[JavaScript 数据结构与算法之美](https://mp.weixin.qq.com/s/KmoRDGdJLZ7reMfTDDaFGg)
22-
- 绿意:[前端硬核面试专题之 CSS 55 问](https://mp.weixin.qq.com/s/SVKMsQtOLNqYXeT_f95FUw)
23-
- 红绯:[日常 | 我用什么工具写作?](https://mp.weixin.qq.com/s/DrvJBEWqH14atF_4O1IXFw)
24-
- Wechat-Format:[Markdown Nice新特性:阿里云图床](https://mp.weixin.qq.com/s/QPsOUkLCsvhqSicTOGaHJg)
9+
```shell
10+
$ yarn add markdown-nice
11+
```
2512

26-
> 欢迎提供更多文章示例~~
13+
或者
2714

28-
## 开发文档
15+
```shell
16+
$ npm install markdown-nice --save
17+
```
2918

30-
开发文档请参考本项目的[wiki](https://github.com/zhning12/markdown-nice/wiki/%E5%BC%80%E5%8F%91%E6%96%87%E6%A1%A3)
19+
2、在 index.html 文件中添加下面代码
3120

32-
## 关于
21+
```html
22+
<link href="https://draw-wechat.oss-cn-hangzhou.aliyuncs.com/KaTeX/0.5.1/katex.min.css" rel="stylesheet" />
23+
<style id="basic-theme" type="text/css"></style>
24+
<style id="markdown-theme" type="text/css"></style>
25+
<style id="code-theme" type="text/css"></style>
26+
<style id="font-theme" type="text/css"></style>
27+
```
3328

34-
目前 mdnice 已经有了一定量的用户,故而组建了**微信群**,欢迎反馈意见和公众号大佬们一起交流,扫一扫二维码拉你入群。
29+
3、示例代码
3530

36-
<img width="250px" src="https://draw-wechat.oss-cn-hangzhou.aliyuncs.com/%E7%89%A7%E7%A0%81%E5%95%A6%E5%B0%8F%E5%8F%B7%E4%BA%8C%E7%BB%B4%E7%A0%81_20190929092055.JPG"/>
31+
```jsx
32+
import React from "react";
33+
import MarkdownNice from "markdown-nice";
3734

35+
function App() {
36+
return (
37+
<div>
38+
<MarkdownNice />
39+
</div>
40+
);
41+
}
3842

39-
欢迎打赏哟,您的支持是我最大的动力!
43+
export default App;
44+
```
4045

41-
<img width="250px" src="https://draw-wechat.oss-cn-hangzhou.aliyuncs.com/%E6%89%93%E8%B5%8F%E4%BA%8C%E7%BB%B4%E7%A0%81_20190825201704.png"/>
46+
## 组件化分支开发流程
4247

43-
## 参考资料
48+
1. 初始化一个新项目
49+
2. 在本项目下执行 `yarn link`
50+
3. 在本项目内运行 `yarn watch`,将会自动监听 `src` 下的文件变动,自动将新代码编译到 `lib`
51+
4. 在新项目中执行 `yarn link markdown-nice`
52+
5. 启动新项目 `yarn start`
4453

45-
- [md2all](https://md.aclickall.com/)
46-
- [wechat-format](https://github.com/lyricat/wechat-format)
54+
## todo
55+
56+
- [ ] 自动注入 style 文件
57+
- [ ] 提供对外的 props 配置
58+
- [ ] 压缩代码
59+
- [ ] 提供 ts types

0 commit comments

Comments
 (0)