{"id":13457397,"url":"https://github.com/doocs/md","last_synced_at":"2025-05-12T13:11:32.001Z","repository":{"id":37285195,"uuid":"218952803","full_name":"doocs/md","owner":"doocs","description":"✍ WeChat Markdown Editor | 一款高度简洁的微信 Markdown 编辑器：支持 Markdown 语法、自定义主题样式、内容管理、多图床、AI 助手等特性","archived":false,"fork":false,"pushed_at":"2025-05-08T12:56:03.000Z","size":37080,"stargazers_count":9289,"open_issues_count":50,"forks_count":1504,"subscribers_count":71,"default_branch":"main","last_synced_at":"2025-05-08T19:04:22.762Z","etag":null,"topics":["ai-bot","doocs","editor","llm","markdown","markdown-editor","tailwindcss","vite","vue","vue3","wechat","weixin"],"latest_commit_sha":null,"homepage":"https://md.doocs.org","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doocs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":"doocs","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-11-01T09:14:36.000Z","updated_at":"2025-05-08T17:28:26.000Z","dependencies_parsed_at":"2023-12-15T10:04:47.231Z","dependency_job_id":"ffb87861-5fde-49dd-ac20-85caab1bf518","html_url":"https://github.com/doocs/md","commit_stats":{"total_commits":601,"total_committers":29,"mean_commits":"20.724137931034484","dds":"0.45091514143094846","last_synced_commit":"e032c06ba3489d45e55b87404df8dbccc39cede7"},"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doocs%2Fmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doocs%2Fmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doocs%2Fmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doocs%2Fmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doocs","download_url":"https://codeload.github.com/doocs/md/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253745170,"owners_count":21957318,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-bot","doocs","editor","llm","markdown","markdown-editor","tailwindcss","vite","vue","vue3","wechat","weixin"],"created_at":"2024-07-31T08:01:42.548Z","updated_at":"2025-05-12T13:11:31.933Z","avatar_url":"https://github.com/doocs.png","language":"Vue","readme":"\u003cdiv align=\"center\"\u003e\n\n[![doocs-md](https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/logo-2.png)](https://github.com/doocs/md)\n\n\u003c/div\u003e\n\n\u003ch1 align=\"center\"\u003e微信 Markdown 编辑器\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![status](https://img.shields.io/github/actions/workflow/status/doocs/md/deploy.yml?style=flat-square\u0026labelColor=564341\u0026color=42cc23)](https://github.com/doocs/md/actions) [![node](https://img.shields.io/badge/node-%3E%3D20-42cc23?style=flat-square\u0026labelColor=564341)](https://nodejs.org/en/about/previous-releases) [![pr](https://img.shields.io/badge/prs-welcome-42cc23?style=flat-square\u0026labelColor=564341)](https://github.com/doocs/md/pulls) [![stars](https://img.shields.io/github/stars/doocs/md?style=flat-square\u0026labelColor=564341\u0026color=42cc23)](https://github.com/doocs/md/stargazers) [![forks](https://img.shields.io/github/forks/doocs/md?style=flat-square\u0026labelColor=564341\u0026color=42cc23)](https://github.com/doocs/md)\u003cbr\u003e [![release](https://img.shields.io/github/v/release/doocs/md?style=flat-square\u0026labelColor=564341\u0026color=42cc23)](https://github.com/doocs/md/releases) [![npm](https://img.shields.io/npm/v/@doocs/md-cli?style=flat-square\u0026labelColor=564341\u0026color=42cc23)](https://www.npmjs.com/package/@doocs/md-cli) [![docker](https://img.shields.io/badge/docker-latest-42cc23?style=flat-square\u0026labelColor=564341)](https://hub.docker.com/r/doocs/md)\n\n\u003c/div\u003e\n\n## 项目介绍\n\nMarkdown 文档自动即时渲染为微信图文，让你不再为微信内容排版而发愁！只要你会基本的 Markdown 语法，就能做出一篇样式简洁而又美观大方的微信图文。\n\n欢迎给项目点个 ⭐️，我们会持续更新和维护。\n\n## 在线编辑器地址\n\n[https://md.doocs.org](https://md.doocs.org)\n\n注：推荐使用 Chrome 浏览器，效果最佳。\n\n## 为何开发这款编辑器\n\n现有的开源微信 Markdown 编辑器样式繁杂，排版过程中往往需要额外调整，影响使用效率。为了解决这一问题，我们打造了一款更加简洁、优雅的编辑器，提供更流畅的排版体验。\n\n欢迎各位朋友随时提交 PR，让这款微信 Markdown 编辑器变得更好！如果你有新的想法，也欢迎在 [Discussions 讨论区](https://github.com/doocs/md/discussions)反馈。\n\n注：我们项目最新版本基于 Vue3 开发，基于 Vue2 的旧版本已经不再维护，如果你需要 Vue2 版本，请切换到 [1.x](https://github.com/doocs/md/tree/1.x) 分支。\n\n## 功能特性\n\n- [x] 支持 Markdown 所有基础语法、数学公式\n- [x] 提供对 Mermaid 图表的渲染和 [GFM 警告块](https://github.com/orgs/community/discussions/16925)的支持\n- [x] 丰富的代码块高亮主题，提升代码可读性\n- [x] 允许自定义主题色和 CSS 样式，灵活定制展示效果\n- [x] 提供多图上传功能，并可自定义配置图床\n- [x] 便捷的文件导入、导出功能，提升工作效率\n- [x] 内置本地内容管理功能，支持草稿自动保存\n- [x] 集成主流 AI 模型（如 DeekSeek、OpenAI、通义千问、腾讯混元、火山方舟 等等），辅助内容创作\n\n## 目前支持哪些图床\n\n| #   | 图床                                                   | 使用时是否需要配置                                                         | 备注                                                                                                                   |\n| --- | ------------------------------------------------------ | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |\n| 1   | 默认                                                   | 否                                                                         | -                                                                                                                      |\n| 2   | [GitHub](https://github.com)                           | 配置 `Repo`、`Token` 参数                                                  | [如何获取 GitHub token？](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) |\n| 3   | [阿里云](https://www.aliyun.com/product/oss)           | 配置 `AccessKey ID`、`AccessKey Secret`、`Bucket`、`Region` 参数           | [如何使用阿里云 OSS？](https://help.aliyun.com/document_detail/31883.html)                                             |\n| 4   | [腾讯云](https://cloud.tencent.com/act/pro/cos)        | 配置 `SecretId`、`SecretKey`、`Bucket`、`Region` 参数                      | [如何使用腾讯云 COS？](https://cloud.tencent.com/document/product/436/38484)                                           |\n| 5   | [七牛云](https://www.qiniu.com/products/kodo)          | 配置 `AccessKey`、`SecretKey`、`Bucket`、`Domain`、`Region` 参数           | [如何使用七牛云 Kodo？](https://developer.qiniu.com/kodo)                                                              |\n| 6   | [MinIO](https://min.io/)                               | 配置 `Endpoint`、`Port`、`UseSSL`、`Bucket`、`AccessKey`、`SecretKey` 参数 | [如何使用 MinIO？](http://docs.minio.org.cn/docs/master/)                                                              |\n| 7   | [公众号](https://mp.weixin.qq.com/)                    | 配置 `appID`、`appsecret`、`代理域名` 参数                                 | [如何使用公众号图床？](https://md-pages.doocs.org/tutorial)                                                            |\n| 8   | [Cloudflare R2](https://developers.cloudflare.com/r2/) | 配置 `AccountId`、`AccessKey`、`SecretKey`、`Bucket`、`Domain` 参数        | [如何使用 S3 API 操作 R2？](https://developers.cloudflare.com/r2/api/s3/api/)                                          |\n| 9   | [又拍云](https://www.upyun.com/)                       | 配置 `Bucket`、`Operator`、`Password`、`Domain` 参数                       | [如何使用 又拍云](https://help.upyun.com/)                                                                             |\n| 10  | 自定义上传                                             | 是                                                                         | [如何自定义上传？](#自定义上传逻辑)                                                                                    |\n\n![demo1](https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/demo1.gif)\n\n![demo2](https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/demo2.gif)\n\n![demo3](https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/demo3.gif)\n\n![demo4](https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/demo4.gif)\n\n## 注意事项\n\n1. 如果你使用了某些浏览器脚本修改了网页背景色，可能导致渲染后的内容出现背景色分块的现象，详见 [#63](https://github.com/doocs/md/issues/63)。\n2. 某些浏览器插件，会对内容样式造成破坏。现象是：复制粘贴到公众号后台内容，点击保存时，样式丢失，详见 [#151](https://github.com/doocs/md/issues/151)。\n\n## 自定义上传逻辑\n\n在工具上没有提供预定义图床的情况下，你只需要自定义上传逻辑即可，这对于例如你不方便使用公共图床，而是使用自己的上传服务时非常有用。\n\n你只需要在给定的函数中更改上传代码即可，为了方便，这个函数提供了可能使用的一些参数：\n\n示例代码：\n\n```js\nconst { file, util, okCb, errCb } = CUSTOM_ARG\nconst param = new FormData()\nparam.append(`file`, file)\nutil.axios\n  .post(`http://127.0.0.1:9000/upload`, param, {\n    headers: { 'Content-Type': `multipart/form-data` },\n  })\n  .then((res) =\u003e {\n    okCb(res.url)\n  })\n  .catch((err) =\u003e {\n    errCb(err)\n  })\n\n// 提供的可用参数:\n// CUSTOM_ARG = {\n//   content, // 待上传图片的 base64\n//   file, // 待上传图片的 file 对象\n//   util: {\n//     axios, // axios 实例\n//     CryptoJS, // 加密库\n//     OSS, // tiny-oss\n//     COS, // cos-js-sdk-v5\n//     Buffer, // buffer-from\n//     uuidv4, // uuid\n//     qiniu, // qiniu-js\n//     tokenTools, // 一些编码转换函数\n//     getDir, // 获取 年/月/日 形式的目录\n//     getDateFilename, // 根据文件名获取它以 时间戳+uuid 的形式\n//   },\n//   okCb: resolve, // 重要！上传成功后给此回调传 url 即可\n//   errCb: reject, // 上传失败调用的函数\n// }\n```\n\n如果你创建了适用于其他第三方图床的上传代码，我们非常欢迎你分享它。\n\n## 如何开发和部署\n\n```sh\n# 安装 node 版本\nnvm i \u0026\u0026 nvm use\n\n# 安装依赖\nnpm i\n\n# 启动开发模式\nnpm start\n\n# 部署在 /md 目录\nnpm run build\n# 访问 http://127.0.0.1:9000/md\n\n# 部署在根目录\nnpm run build:h5-netlify\n# 访问 http://127.0.0.1:9000/\n```\n\n## 快速搭建私有服务\n\n### 方式 1. 使用 npm cli\n\n通过我们的 npm cli 你可以轻易搭建属于自己的微信 Markdown 编辑器。\n\n```sh\n# 安装\nnpm i -g @doocs/md-cli\n\n# 启动\nmd-cli\n\n# 访问\nopen http://127.0.0.1:8800/md/\n\n# 启动并指定端口\nmd-cli port=8899\n\n# 访问\nopen http://127.0.0.1:8899/md/\n```\n\nmd-cli 支持以下命令行参数：\n\n- `port` 指定端口号，默认 8800，如果被占用会随机使用一个新端口。\n- `spaceId` dcloud 服务空间配置\n- `clientSecret` dcloud 服务空间配置\n\n### 方式 2. 使用 Docker 镜像\n\n如果你是 Docker 用户，也可以直接使用一条命令，启动完全属于你的、私有化运行的实例。\n\n```sh\ndocker run -d -p 8080:80 doocs/md:latest\n```\n\n容器运行起来之后，打开浏览器，访问 http://localhost:8080 即可。\n\n关于本项目 Docker 镜像的更多详细信息，可以关注 https://github.com/doocs/docker-md\n\n## 谁在使用\n\n请查看 [USERS.md](USERS.md) 文件，了解使用本项目的公众号。\n\n## 支持我们\n\n如果本项目对你有所帮助，可以通过以下方式支持我们。\n\n\u003ctable style=\"margin: 0 auto\"\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" style=\"width: 260px\"\u003e\n        \u003cimg\n          src=\"https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/support1.jpg\"\n          style=\"width: 200px\"\n        /\u003e\u003cbr /\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" style=\"width: 260px\"\u003e\n        \u003cimg\n          src=\"https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/support2.jpg\"\n          style=\"width: 200px\"\n        /\u003e\u003cbr /\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## 反馈与交流\n\n如果你在使用过程中遇到问题，或者有好的建议，欢迎在 [Issues](https://github.com/doocs/md/issues) 中反馈。你也可以加入我们的交流群，和我们一起讨论，若群二维码失效，请添加好友，备注 `md`，我们会拉你进群。\n\n\u003ctable style=\"margin: 0 auto\"\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" style=\"width: 260px\"\u003e\n        \u003cimg\n          src=\"https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/doocs-md-wechat-group.jpg\"\n          style=\"width: 200px\"\n        /\u003e\u003cbr /\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" style=\"width: 260px\"\u003e\n        \u003cimg\n          src=\"https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/wechat-ylb.jpg\"\n          style=\"width: 200px\"\n        /\u003e\u003cbr /\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n","funding_links":["https://opencollective.com/doocs"],"categories":["Vue","置顶","Browser editor","1. Online Tools","网站生成与排版","JavaScript"],"sub_categories":["9、效率工具集合","公众号"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoocs%2Fmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoocs%2Fmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoocs%2Fmd/lists"}