├── .eslintignore ├── .eslintrc ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .npmignore ├── .prettierrc ├── .storybook ├── .babelrc └── config.js ├── CHANGELOG.md ├── LICENSE ├── README.md ├── bonus.png ├── config ├── env.js ├── jest │ ├── cssTransform.js │ └── fileTransform.js ├── paths.js ├── webpack.config.js ├── webpack.config.lib.js └── webpackDevServer.config.js ├── group.png ├── main.js ├── package.json ├── public ├── favicon.svg ├── index.html └── manifest.json ├── scripts ├── build.js ├── start.js └── test.js ├── src ├── App.css ├── App.js ├── App.test.js ├── Lib.js ├── component │ ├── Dialog │ │ ├── AboutDialog.js │ │ ├── FormDialog.js │ │ ├── HistoryDialog.js │ │ ├── ImageDialog.js │ │ ├── LinkDialog.js │ │ ├── SitDownDialog.js │ │ ├── TutorialDialog.js │ │ ├── VersionDialog.css │ │ └── VersionDialog.js │ ├── ImageHosting │ │ ├── AliOSS.js │ │ ├── GitHub.js │ │ ├── Gitee.js │ │ └── QiniuOSS.js │ ├── LocalHistory │ │ ├── index.js │ │ ├── indexdb.js │ │ ├── localHistory.css │ │ └── util.js │ ├── MenuLeft │ │ ├── CodeTheme.css │ │ ├── CodeTheme.js │ │ ├── File.js │ │ ├── File │ │ │ ├── ExportMarkdown.js │ │ │ ├── ExportPdf.js │ │ │ └── ImportFile.js │ │ ├── Function.js │ │ ├── Function │ │ │ ├── History.js │ │ │ ├── Reset.js │ │ │ ├── Search.js │ │ │ └── SitDown.js │ │ ├── Help.js │ │ ├── Help │ │ │ ├── About.js │ │ │ ├── Document.js │ │ │ ├── Question.js │ │ │ └── Version.js │ │ ├── LogIn.js │ │ ├── Login.css │ │ ├── Paragraph.js │ │ ├── Pattern.js │ │ ├── Pattern │ │ │ ├── Bold.js │ │ │ ├── Code.js │ │ │ ├── Del.js │ │ │ ├── Font.js │ │ │ ├── Form.js │ │ │ ├── Format.js │ │ │ ├── Image.js │ │ │ ├── InlineCode.js │ │ │ ├── Italic.js │ │ │ ├── Link.js │ │ │ └── LinkToFoot.js │ │ ├── Setting.js │ │ ├── Setting │ │ │ ├── ContainImgName.js │ │ │ └── SyncScroll.js │ │ ├── Theme.css │ │ ├── Theme.js │ │ ├── Tutorial.js │ │ ├── View.js │ │ ├── View │ │ │ ├── EditArea.js │ │ │ ├── FullScreen.js │ │ │ ├── PreviewArea.js │ │ │ └── ThemeArea.js │ │ └── common.css │ ├── SearchBox │ │ ├── SearchBox.css │ │ └── index.js │ └── Sidebar │ │ ├── Juejin.css │ │ ├── Juejin.js │ │ ├── PreviewType.css │ │ ├── PreviewType.js │ │ ├── Wechat.css │ │ ├── Wechat.js │ │ ├── Zhihu.css │ │ └── Zhihu.js ├── icon │ ├── Close.js │ ├── Copy.js │ ├── Down.js │ ├── Environment.js │ ├── FontCase.js │ ├── GitHub.js │ ├── Inbox.js │ ├── Juejin.js │ ├── Mobile.js │ ├── More.js │ ├── PC.js │ ├── Rabbit.js │ ├── Replace.js │ ├── ReplaceAll.js │ ├── Smile.js │ ├── User.js │ ├── Wechat.js │ ├── Zhihu.js │ ├── index.css │ └── index.js ├── index.css ├── index.d.ts ├── index.js ├── layout │ ├── Dialog.js │ ├── EditorMenu.css │ ├── EditorMenu.js │ ├── Footer.css │ ├── Footer.js │ ├── Navbar.css │ ├── Navbar.js │ ├── Sidebar.css │ ├── Sidebar.js │ └── StyleEditor.js ├── logo.svg ├── serviceWorker.js ├── store │ ├── content.js │ ├── dialog.js │ ├── footer.js │ ├── imageHosting.js │ ├── navbar.js │ ├── title.js │ ├── userInfo.js │ └── view.js ├── template │ ├── basic.js │ ├── code │ │ ├── atomOneDark.js │ │ ├── atomOneLight.js │ │ ├── github.js │ │ ├── monokai.js │ │ ├── vs2015.js │ │ └── xcode.js │ ├── content.md │ ├── index.js │ ├── macCode │ │ ├── macAtomOneDark.js │ │ ├── macAtomOneLight.js │ │ ├── macGithub.js │ │ ├── macMonokai.js │ │ ├── macVs2015.js │ │ └── macXcode.js │ └── markdown │ │ ├── custom.js │ │ └── normal.js └── utils │ ├── appContext.js │ ├── constant.js │ ├── converter.js │ ├── editorKeyEvents.js │ ├── helper.js │ ├── hotkey.js │ ├── imageHosting.js │ ├── langHighlight.js │ ├── markdown-it-imageflow.js │ ├── markdown-it-li.js │ ├── markdown-it-linkfoot.js │ ├── markdown-it-math.js │ ├── markdown-it-multiquote.js │ ├── markdown-it-removepre.js │ ├── markdown-it-span.js │ ├── markdown-it-table-container.js │ ├── mdMirror.css │ ├── pluginCenter.js │ ├── sitdownConverter.js │ └── styleMirror.css ├── stories ├── allImageHosting.js ├── defaultImageHosting.js ├── index.js ├── noneImageHosting.js └── online.js ├── watch.js └── yarn.lock /.eslintignore: -------------------------------------------------------------------------------- 1 | /config/ 2 | /scripts/ 3 | *.test.* 4 | /main.js 5 | *.d.ts -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["airbnb", "plugin:prettier/recommended"], // eslint扩展规则 3 | "parserOptions": { 4 | "ecmaVersion": 7, 5 | "sourceType": "module", 6 | "ecmaFeatures": { 7 | "jsx": true 8 | } 9 | }, 10 | "parser": "babel-eslint", // 解决ES6 improt会报错 11 | "env": { 12 | // eg如果不配置browser,window就会被eslint报undefined的错 13 | "es6": true, 14 | "browser": true, 15 | "node": true 16 | }, 17 | "plugins": ["react", "jsx-a11y", "import"], 18 | "rules": { 19 | "quotes": [0, "double"], 20 | "class-methods-use-this": 0, 21 | "import/no-named-as-default": 0, 22 | "react/jsx-filename-extension": [ 23 | "error", 24 | { 25 | "extensions": [".js", ".jsx"] 26 | } 27 | ], 28 | "react/prop-types": 0, 29 | "react/destructuring-assignment": 0, 30 | "react/no-array-index-key": 0, 31 | "no-use-before-define": 0, 32 | "no-restricted-syntax": 0, 33 | "no-var": 0, 34 | "vars-on-top": 0, 35 | "no-plusplus": 0, 36 | "no-continue": 0, 37 | "prefer-template": 0, 38 | "object-shorthand": 0, 39 | "no-else-return": 0, 40 | "no-param-reassign": 0, 41 | "no-unused-vars": 1, 42 | "jsx-a11y/anchor-is-valid": 0, 43 | "react/jsx-props-no-spreading": 0, 44 | "import/no-extraneous-dependencies": 0, 45 | "import/order": 0, 46 | "jsx-a11y/mouse-events-have-key-events": 0, 47 | "no-lonely-if": 0, 48 | "one-var": 0, 49 | "react/prefer-stateless-function": 0, 50 | "react/jsx-wrap-multilines": 0, 51 | "no-unused-expressions": 0, 52 | "react/no-danger": 0, 53 | "no-console": 0, 54 | "camelcase": 0, 55 | "import/no-dynamic-require": 1, 56 | "global-require": 1, 57 | "react/forbid-prop-types": 1, 58 | "jsx-a11y/accessible-emoji": 0, 59 | "jsx-a11y/click-events-have-key-events": 0, 60 | "jsx-a11y/no-static-element-interactions": 0 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 提交 Bug 3 | about: 提交 Bug 用于改进本项目 4 | title: '' 5 | labels: bug 6 | assignees: guanpengchn 7 | 8 | --- 9 | 10 | **运行环境:** 11 | 12 | |操作系统|浏览器| 13 | |---|---| 14 | |macOS|Chrome| 15 | 16 | **Markdown文本内容:** 17 | 18 | 例如: 19 | 20 | ```md 21 | - 默认文本1 22 | - 默认文本2 23 | - 默认文本3 24 | ``` 25 | 26 | **错误详情:** 27 | 28 | 例如:块级公式转换错误,控制台报错A is undefined -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 新特性 3 | about: 有新特性的需要 4 | title: '' 5 | labels: feature 6 | assignees: guanpengchn 7 | 8 | --- 9 | 10 | **新特性描述:** -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | 25 | dist 26 | package-lock.json 27 | lib -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | build 2 | config 3 | dist 4 | node_modules 5 | public 6 | scripts 7 | src 8 | .eslintrc 9 | .gitignore 10 | .prettierrc 11 | logo.png 12 | main.js 13 | package.json 14 | package-lock.json 15 | yarn.lock 16 | .npmignore -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": true, 6 | "singleQuote": false, 7 | "jsxSingleQuote": false, 8 | "trailingComma": "all", 9 | "bracketSpacing": false, 10 | "jsxBracketSameLine": false, 11 | "arrowParens": "always" 12 | } -------------------------------------------------------------------------------- /.storybook/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/env", 4 | "@babel/preset-react" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /.storybook/config.js: -------------------------------------------------------------------------------- 1 | import { configure } from '@storybook/react'; 2 | 3 | function loadStories() { 4 | require('../stories/index.js'); 5 | // You can require as many stories as you need. 6 | } 7 | 8 | configure(loadStories, module); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |