├── .eslintignore
├── demo.png
├── wx.png
├── .DS_Store
├── daitu.jpg
├── wx-group.png
├── assets
├── .DS_Store
└── css
│ ├── element-variables.scss
│ └── reset.css
├── static
├── .DS_Store
├── favicon.ico
└── img
│ ├── 404-full.png
│ ├── github.svg
│ └── logo.svg
├── plugins
├── hw-editor.js
├── element-ui.js
└── axios.js
├── .github
├── ISSUE_TEMPLATE
│ ├── feature_request.md
│ ├── bug_report.md
│ └── question.md
└── FUNDING.yml
├── .editorconfig
├── pm2system.config.js
├── layouts
└── default.vue
├── package.json
├── .eslintrc.js
├── .gitignore
├── README.md
├── nuxt.config.js
├── pages
└── index.vue
└── server
└── index.js
/.eslintignore:
--------------------------------------------------------------------------------
1 | components/hw-editor/**
2 |
--------------------------------------------------------------------------------
/demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/helloworld-Co/html2md/HEAD/demo.png
--------------------------------------------------------------------------------
/wx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/helloworld-Co/html2md/HEAD/wx.png
--------------------------------------------------------------------------------
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/helloworld-Co/html2md/HEAD/.DS_Store
--------------------------------------------------------------------------------
/daitu.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/helloworld-Co/html2md/HEAD/daitu.jpg
--------------------------------------------------------------------------------
/wx-group.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/helloworld-Co/html2md/HEAD/wx-group.png
--------------------------------------------------------------------------------
/assets/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/helloworld-Co/html2md/HEAD/assets/.DS_Store
--------------------------------------------------------------------------------
/static/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/helloworld-Co/html2md/HEAD/static/.DS_Store
--------------------------------------------------------------------------------
/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/helloworld-Co/html2md/HEAD/static/favicon.ico
--------------------------------------------------------------------------------
/static/img/404-full.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/helloworld-Co/html2md/HEAD/static/img/404-full.png
--------------------------------------------------------------------------------
/plugins/hw-editor.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import mavonEditor from 'mavon-editor'
3 | import 'mavon-editor/dist/css/index.css'
4 |
5 | Vue.use(mavonEditor)
6 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature Request(新功能建议)
3 | about: Suggest an idea for this project
4 | ---
5 |
6 | ## Feature request(新功能建议)
7 |
8 |
--------------------------------------------------------------------------------
/plugins/element-ui.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import '@/assets/css/element-variables.scss'
3 |
4 | // 按需加载组件
5 | import {
6 | Button,
7 | Input
8 | } from 'element-ui'
9 | Vue.use(Button)
10 | Vue.use(Input)
11 |
--------------------------------------------------------------------------------
/assets/css/element-variables.scss:
--------------------------------------------------------------------------------
1 | /* 改变主题色变量 */
2 | $--color-primary: #00A6F4;
3 |
4 | /* 改变 icon 字体路径变量,必需 */
5 | $--font-path: '~element-ui/lib/theme-chalk/fonts';
6 |
7 | @import "~element-ui/packages/theme-chalk/src/index";
8 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 | charset = utf-8
12 |
13 | [*.md]
14 | trim_trailing_whitespace = false
15 |
--------------------------------------------------------------------------------
/plugins/axios.js:
--------------------------------------------------------------------------------
1 | const codes = {
2 | success: 1
3 | }
4 |
5 | export default function ({ $axios, store, redirect, req }) {
6 | // 添加请求拦截器
7 | $axios.onRequest((req) => {
8 |
9 | })
10 |
11 | // 添加响应拦截器
12 | $axios.onResponse((res) => {
13 | return new Promise((resolve, reject) => {
14 | const { data = {} } = res
15 | if (data.code === codes.success) { // 成功
16 | resolve(data)
17 | return
18 | }
19 |
20 | reject(res)
21 | })
22 | })
23 | }
24 |
--------------------------------------------------------------------------------
/pm2system.config.js:
--------------------------------------------------------------------------------
1 | /* pm2system.config.js
2 | * pm2 start pm2system.config.js --only hello-html2md
3 | */
4 | module.exports = {
5 | apps: [
6 | {
7 | name: 'hello-html2md', // 应用名
8 | cwd: './', // 当前工作路径
9 | script: 'npm', // 实际启动脚本
10 | args: 'run start', // 参数
11 | autorestart: true,
12 | watch: true, // 监控变化的目录,一旦变化,自动重启
13 | watch_delay: 10000,
14 | ignore_watch: ['node_modules', 'static'], // 从监控目录中排除
15 | watch_options: {
16 | 'followSymlinks': false,
17 | 'usePolling': true
18 | }
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report(报告问题)
3 | about: Create a report to help us improve
4 | ---
5 |
10 |
11 |
12 | ## Bug report(问题描述)
13 |
14 | #### Steps to reproduce(问题复现步骤)
15 |
20 |
21 | #### Screenshot or Gif(截图或动态图)
22 |
23 |
24 | #### Other relevant information(格外信息)
25 | - Your OS:
26 | - Your broswer version:
27 |
--------------------------------------------------------------------------------
/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
72 |
73 |
74 | ## 支持环境
75 |
76 | 现代浏览器及 IE11。
77 |
78 | | [
](http://godban.github.io/browsers-support-badges/)IE / Edge | [
](http://godban.github.io/browsers-support-badges/)Firefox | [
](http://godban.github.io/browsers-support-badges/)Chrome | [
](http://godban.github.io/browsers-support-badges/)Safari | [
](http://godban.github.io/browsers-support-badges/)Opera |
79 | | --------- | --------- | --------- | --------- | --------- |
80 | | IE11, Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions
81 |
82 | ## 参与贡献
83 |
84 | 我们非常欢迎你的贡献,你可以通过以下方式和我们一起共建 😃
85 |
86 | - 通过 [Issue](https://github.com/helloworld-Co/html2md/issues) 报告 bug。
87 | - 提交 [Pull Request](https://github.com/helloworld-Co/html2md/pulls) 一起改进。
88 |
89 | ## 技术交流
90 |
91 |
--------------------------------------------------------------------------------
/nuxt.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | telemetry: false,
3 | /*
4 | ** Headers of the page
5 | */
6 | head: {
7 | title: 'hello-html2md',
8 | meta: [
9 | { charset: 'utf-8' },
10 | { name: 'viewport', content: 'width=device-width, initial-scale=1' },
11 | { hid: 'description', name: 'description', content: 'helloworld社区开发的轻量强大的html一键转md工具,支持多平台一键转换。' },
12 | { hid: 'keywords', name: 'keywords', content: 'javscript,html,markdown,vue,html-to-markdown,md,helloworld,helloworld开发者社区' },
13 | { name: 'renderer', content: 'webkit' },
14 | { 'http-equiv': 'X-UA-Compatible', content: 'IE=edge,chrome=1' }
15 | ],
16 | link: [
17 | { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
18 | ]
19 | },
20 |
21 | /*
22 | ** Customize the progress-bar color
23 | */
24 | loading: { color: '#00A6F4' },
25 |
26 | /*
27 | ** Global CSS
28 | */
29 | css: [
30 | 'assets/css/reset.css'
31 | ],
32 |
33 | /*
34 | ** Plugins to load before mounting the App
35 | */
36 | plugins: [
37 | '@/plugins/axios',
38 | '@/plugins/element-ui',
39 | { src: '@/plugins/hw-editor', ssr: false }
40 | ],
41 | /*
42 | ** Nuxt.js dev-modules
43 | */
44 | buildModules: [
45 | // Doc: https://github.com/nuxt-community/eslint-module
46 | '@nuxtjs/eslint-module'
47 | ],
48 | /*
49 | ** Nuxt.js modules
50 | */
51 | modules: [
52 | '@nuxtjs/axios',
53 | '@nuxtjs/component-cache'
54 | ],
55 | /*
56 | ** axios modules
57 | ** https://axios.nuxtjs.org/options
58 | */
59 | axios: {
60 | proxy: true, // Can be also an object with default options
61 | credentials: true
62 | },
63 | /*
64 | ** Build configuration
65 | */
66 | build: {
67 | // analyze: true, // 打包时用来分析依赖包包大小
68 | transpile: [],
69 | extractCSS: true, // 单独提取 css
70 | babel: {
71 | 'plugins': [
72 | [
73 | 'component',
74 | {
75 | 'libraryName': 'element-ui',
76 | 'styleLibraryName': 'theme-chalk'
77 | }
78 | ]
79 | ],
80 | 'comments': true
81 | },
82 | optimization: {
83 | splitChunks: {
84 | chunks: 'all',
85 | minSize: 30000, // 模块的最小体积
86 | // maxSize: 360000, // 模块的最大体积
87 | automaticNameDelimiter: '~', // 文件名的连接符
88 | name: true,
89 | cacheGroups: { // 缓存组
90 | styles: {
91 | test: /\.[css|less|scss|sass]/,
92 | chunks: 'all',
93 | priority: 30,
94 | enforce: true
95 | },
96 | 'element-ui': {
97 | test: /node_modules[\\/]element-ui/,
98 | chunks: 'initial',
99 | priority: 20,
100 | name: true,
101 | enforce: true
102 | },
103 | vendors: {
104 | test: /[\\/]node_modules[\\/]/,
105 | chunks: 'initial',
106 | priority: 10,
107 | enforce: true
108 | },
109 | default: {
110 | minChunks: 2,
111 | priority: -10,
112 | reuseExistingChunk: true
113 | }
114 | }
115 | }
116 | },
117 | /*
118 | ** You can extend webpack config here
119 | */
120 | extend (config, { isDev, isClient }) {
121 | if (isClient && !isDev) {
122 | config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true
123 | }
124 | }
125 | },
126 | server: {
127 | port: 3031, // default: 3000
128 | host: 'localhost' // default: localhost
129 | },
130 | env: {
131 |
132 | }
133 | }
134 |
--------------------------------------------------------------------------------
/assets/css/reset.css:
--------------------------------------------------------------------------------
1 | /**
2 | * 重置样式
3 | * */
4 | html,
5 | body,
6 | div,
7 | span,
8 | applet,
9 | object,
10 | iframe,
11 | p,
12 | blockquote,
13 | pre,
14 | a,
15 | abbr,
16 | acronym,
17 | address,
18 | big,
19 | cite,
20 | code,
21 | del,
22 | dfn,
23 | em,
24 | img,
25 | ins,
26 | kbd,
27 | q,
28 | s,
29 | samp,
30 | small,
31 | strike,
32 | sub,
33 | sup,
34 | tt,
35 | var,
36 | b,
37 | u,
38 | i,
39 | center,
40 | dl,
41 | dt,
42 | dd,
43 | ol,
44 | ul,
45 | li,
46 | fieldset,
47 | form,
48 | label,
49 | legend,
50 | table,
51 | caption,
52 | tbody,
53 | tfoot,
54 | thead,
55 | tr,
56 | th,
57 | td,
58 | article,
59 | aside,
60 | canvas,
61 | details,
62 | embed,
63 | figure,
64 | figcaption,
65 | footer,
66 | header,
67 | hgroup,
68 | menu,
69 | nav,
70 | output,
71 | ruby,
72 | section,
73 | summary,
74 | time,
75 | mark,
76 | audio,
77 | video {
78 | margin: 0;
79 | padding: 0;
80 | border: 0;
81 | font-size: 100%;
82 | -webkit-margin-before: 0;
83 | -webkit-margin-after: 0;
84 | -webkit-margin-start: 0;
85 | -webkit-margin-end: 0;
86 | font-weight: normal;
87 | }
88 |
89 | h1,
90 | h2,
91 | h3,
92 | h4,
93 | h5,
94 | h6,
95 | strong {
96 | margin: 0;
97 | padding: 0;
98 | border: 0;
99 | font-size: 100%;
100 | -webkit-margin-before: 0;
101 | -webkit-margin-after: 0;
102 | -webkit-margin-start: 0;
103 | -webkit-margin-end: 0;
104 | }
105 | /* HTML5 display-role reset for older browsers */
106 |
107 | article,
108 | aside,
109 | details,
110 | figcaption,
111 | figure,
112 | footer,
113 | header,
114 | hgroup,
115 | menu,
116 | nav,
117 | section {
118 | display: block;
119 | }
120 |
121 | ol,
122 | ul,
123 | li {
124 | list-style: none;
125 | }
126 |
127 | blockquote,
128 | q {
129 | quotes: none;
130 | }
131 |
132 | blockquote:before,
133 | blockquote:after,
134 | q:before,
135 | q:after {
136 | content: "";
137 | content: none;
138 | }
139 |
140 | table {
141 | border-collapse: collapse;
142 | border-spacing: 0;
143 | }
144 |
145 | html,
146 | body {
147 | -webkit-tap-hightlight-color: transparent;
148 | font-family: -apple-system, SF UI Text, Arial, PingFang SC, Hiragino Sans GB,
149 | Microsoft YaHei, WenQuanYi Micro Hei, sans-serif;
150 | width: 100%;
151 | height: 100%;
152 | padding: 0;
153 | margin: 0;
154 | background: #f5f5f5;
155 | }
156 |
157 | * {
158 | -moz-box-sizing: border-box;
159 | -webkit-box-sizing: border-box;
160 | box-sizing: border-box;
161 | }
162 |
163 | ol,
164 | ul,
165 | li {
166 | margin: 0;
167 | padding: 0;
168 | list-style-type: none;
169 | }
170 |
171 | img {
172 | border: 0;
173 | vertical-align: middle;
174 | }
175 |
176 | a,
177 | a:hover,
178 | a:focus,
179 | a:active {
180 | text-decoration: none;
181 | outline: none;
182 | }
183 |
184 | p {
185 | font-size: 16px;
186 | }
187 |
188 | /* 文本被选择的背景色以及文本颜色 */
189 | ::selection {
190 | color: #fff;
191 | background-color: #00A6F4;
192 | }
193 |
194 | /* 文本被选择的背景色以及文本颜色 */
195 | ::-moz-selection {
196 | color: #fff;
197 | background-color: #00A6F4;
198 | }
199 |
200 | img {
201 | object-fit: cover;
202 | }
203 |
204 | /* 滚动条 */
205 |
206 | /*滚动条宽度*/
207 | ::-webkit-scrollbar {
208 | -webkit-appearance: none;
209 | width: 6px;
210 | height: 6px;
211 | }
212 |
213 | /* 轨道样式 */
214 | ::-webkit-scrollbar-track {}
215 |
216 |
217 | /* Handle样式 */
218 | ::-webkit-scrollbar-thumb {
219 | border-radius: 6px;
220 | background: rgba(194,194,194,0.4);
221 | box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
222 | }
223 |
224 | ::-webkit-scrollbar-thumb:hover {
225 | border-radius: 6px;
226 | background: rgba(194,194,194,0.8);
227 | }
228 |
229 | ::-webkit-scrollbar-thumb:vertical {
230 | background-color: rgb(194,194,194);
231 | }
232 |
233 | /*hover到滚动条上*/
234 | ::-webkit-scrollbar-thumb:vertical:hover {
235 | background-color: rgba(0, 0, 0, 0.3);
236 | }
237 |
238 | /*滚动条按下*/
239 | ::-webkit-scrollbar-thumb:vertical:active {
240 | background-color: rgba(0, 0, 0, 0.6);
241 | }
242 |
243 | .github-markdown-body ul li,
244 | .vuepress-markdown-body ul li{
245 | list-style: disc!important;
246 | margin-left: 30px!important;
247 | }
248 |
249 | .github-markdown-body ol li,
250 | .vuepress-markdown-body ol li{
251 | list-style: decimal!important;
252 | margin-left: 30px!important;
253 | }
254 |
--------------------------------------------------------------------------------
/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |