md-editor-v3 1.4.4 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +118 -103
- package/lib/MdEditor/Editor.d.ts +43 -23
- package/lib/md-editor-v3.es.js +4891 -1
- package/lib/md-editor-v3.umd.js +62 -1
- package/lib/style.css +1 -1
- package/package.json +4 -3
- package/lib/MdEditor/capi.d.ts +0 -3
- package/lib/MdEditor/components/Divider/index.d.ts +0 -2
- package/lib/MdEditor/components/Dropdown/index.d.ts +0 -44
- package/lib/MdEditor/components/Modal/index.d.ts +0 -49
- package/lib/MdEditor/config.d.ts +0 -20
- package/lib/MdEditor/index.d.ts +0 -2
- package/lib/MdEditor/layouts/Content/composition.d.ts +0 -20
- package/lib/MdEditor/layouts/Content/index.d.ts +0 -58
- package/lib/MdEditor/layouts/Modals/Clip.d.ts +0 -35
- package/lib/MdEditor/layouts/Modals/Link.d.ts +0 -49
- package/lib/MdEditor/layouts/Modals/index.d.ts +0 -42
- package/lib/MdEditor/layouts/Toolbar/composition.d.ts +0 -4
- package/lib/MdEditor/layouts/Toolbar/index.d.ts +0 -50
- package/lib/MdEditor/utils/content-help.d.ts +0 -24
- package/lib/MdEditor/utils/dom.d.ts +0 -6
- package/lib/MdEditor/utils/event-bus.d.ts +0 -17
- package/lib/MdEditor/utils/index.d.ts +0 -62
- package/lib/MdEditor/utils/vue-tsx.d.ts +0 -14
package/README.md
CHANGED
|
@@ -1,72 +1,71 @@
|
|
|
1
1
|
# md-editor-v3
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
    
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
English \| [中文](https://github.com/imzbf/md-editor-v3/blob/dev/README-CN.md)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Markdown editor for vue3, developed by `jsx` and `typescript`.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- Documentation and demo:[Go](https://imzbf.github.io/md-editor-v3)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- Use it online:[Go](https://codesandbox.io/s/epic-bird-2znqo)
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
2. 内置的白色主题和暗黑主题,支持绑定切换;
|
|
15
|
-
3. 支持快捷键插入内容;
|
|
16
|
-
4. 支持使用 prettier 格式化内容(使用 CDN 方式引入,只支持格式化 md 内容,可在代码内设置关闭);
|
|
17
|
-
5. 支持多语言,支持自行扩展语言;
|
|
18
|
-
6. 支持复制粘贴上传图片,图片裁剪上传;
|
|
19
|
-
7. 支持仅预览模式(不显示编辑器,只显示 md 预览内容,无额外监听)
|
|
20
|
-
8. ...
|
|
13
|
+
- The same series editor for react:[md-editor-rt](https://github.com/imzbf/md-editor-rt)
|
|
21
14
|
|
|
22
|
-
|
|
15
|
+
## Features
|
|
23
16
|
|
|
24
|
-
|
|
17
|
+
- Toolbar, screenfull or screenfull in web pages and so on.
|
|
18
|
+
- Themes, Built-in default and dark themes.
|
|
19
|
+
- Shortcut key for editor.
|
|
20
|
+
- Beautify your content by `prettier`(only for markdown content, not the code and other text).
|
|
21
|
+
- Multi-language, build-in Chinese and English(default: Chinese).
|
|
22
|
+
- Upload picture, paste or clip the picture and upload it.
|
|
23
|
+
- Render article directly(no editor,no event listener, only preview content).
|
|
24
|
+
- Preview themes, support `defalut`、`vuepress`、`github` styles(not identical).
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
> More features are developing, if you have some ideas or find issues, please tell it to me~
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
## Preview
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
 |  |  |
|
|
33
33
|
|
|
34
|
-
##
|
|
34
|
+
## Apis
|
|
35
35
|
|
|
36
|
-
###
|
|
36
|
+
### Props
|
|
37
37
|
|
|
38
|
-
|
|
|
38
|
+
| name | type | default | responsive | description |
|
|
39
39
|
| --- | --- | --- | --- | --- |
|
|
40
|
-
| modelValue | String | '' | √ |
|
|
41
|
-
| theme | 'light' \| 'dark' | 'light' | √ |
|
|
42
|
-
| editorClass | String | '' | √ |
|
|
43
|
-
| hljs | Object | null | x |
|
|
44
|
-
| highlightJs | String | [highlight.js@11.2.0](https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.2.0/build/highlight.min.js) | x |
|
|
45
|
-
| highlightCss | String | [atom-one-dark@11.2.0](https://cdn.jsdelivr.net/npm/highlight.js@11.2.0/styles/atom-one-dark.css) | x |
|
|
46
|
-
| historyLength | Number | 10 | x |
|
|
47
|
-
| pageFullScreen | Boolean | false | x |
|
|
48
|
-
| preview | Boolean | true | x |
|
|
49
|
-
| htmlPreview | Boolean | false | x | html
|
|
50
|
-
| previewOnly<sup>v1.3.0</sup> | Boolean | false | x |
|
|
51
|
-
| language | String | 'zh-CN' | √ |
|
|
52
|
-
| languageUserDefined |
|
|
53
|
-
| toolbars | Array | [
|
|
54
|
-
| toolbarsExclude<sup>v1.1.4</sup> | Array | [] | √ |
|
|
55
|
-
| prettier | Boolean | true | x |
|
|
40
|
+
| modelValue | String | '' | √ | Markdown content,use `v-model` in vue template |
|
|
41
|
+
| theme | 'light' \| 'dark' | 'light' | √ | Change editor theme |
|
|
42
|
+
| editorClass | String | '' | √ | |
|
|
43
|
+
| hljs | Object | null | x | `Highlight` instance, editor will not insert script of it, but you need to import `highlight` code style by yourself |
|
|
44
|
+
| highlightJs | String | [highlight.js@11.2.0](https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.2.0/build/highlight.min.js) | x | HighlightJs url |
|
|
45
|
+
| highlightCss | String | [atom-one-dark@11.2.0](https://cdn.jsdelivr.net/npm/highlight.js@11.2.0/styles/atom-one-dark.css) | x | `Highlight` code style |
|
|
46
|
+
| historyLength | Number | 10 | x | The max length of history(if it is too big, editor will use more `RAM`) |
|
|
47
|
+
| pageFullScreen | Boolean | false | x | Screenfull in web page |
|
|
48
|
+
| preview | Boolean | true | x | Preview content in editor |
|
|
49
|
+
| htmlPreview | Boolean | false | x | Preview html in editor |
|
|
50
|
+
| previewOnly<sup>v1.3.0</sup> | Boolean | false | x | Only render article content, no toolbar, no edit area |
|
|
51
|
+
| language | String | 'zh-CN' | √ | Build-in language('zh-CN','en-US') |
|
|
52
|
+
| languageUserDefined<sup>v1.5.0 changed</sup> | Object | {key: StaticTextDefaultValue} | √ | Expand language,update `language` api to your key |
|
|
53
|
+
| toolbars | Array | [toolbars] | √ | Show some item of toolbars,all keys<sup>see `toolbars` below<sup> |
|
|
54
|
+
| toolbarsExclude<sup>v1.1.4</sup> | Array | [] | √ | Don't show some item of toolbars,all keys`toolbars` |
|
|
55
|
+
| prettier | Boolean | true | x | Use prettier to beautify content or not |
|
|
56
56
|
| prettierCDN | String | [standalone@2.4.0](https://cdn.jsdelivr.net/npm/prettier@2.4.0/standalone.js) | x | |
|
|
57
57
|
| prettierMDCDN | String | [parser-markdown@2.4.0](https://cdn.jsdelivr.net/npm/prettier@2.4.0/parser-markdown.js) | x | |
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
> 响应式=x,该属性只支持设置,不支持响应式更新~
|
|
58
|
+
| cropperCss<sup>v1.2.0</sup> | String | [cropper.min.css@1.5.12](https://cdn.jsdelivr.net/npm/cropperjs@1.5.12/dist/cropper.min.css) | x | Cropper css url |
|
|
59
|
+
| cropperJs<sup>v1.2.0</sup> | String | [cropper.min.js@1.5.12](https://cdn.jsdelivr.net/npm/cropperjs@1.5.12/dist/cropper.min.js) | x | Cropper js url |
|
|
60
|
+
| iconfontJs<sup>v1.3.2</sup> | String | [iconfont](https://at.alicdn.com/t/font_2605852_khjf435c7th.js) | x | Icon url |
|
|
61
|
+
| editorId<sup>v1.4.0</sup> | String | random | x | Editor id, also the html id, it is used when there are two or more editor and server render in the future |
|
|
62
|
+
| tabWidth<sup>v1.4.0<sup> | Number | 2 | x | One tab eq some space |
|
|
63
|
+
| showCodeRowNumber<sup>v1.4.3</sup> | Boolean | false | x | Show row number for code block or not |
|
|
64
|
+
| screenfull<sup>v1.4.3</sup> | Object | null | x | Screenfull instance, editor will not insert script of it |
|
|
65
|
+
| screenfullJs<sup><v1.4.3</sup> | String | [screenfull@5.1.0](https://cdn.jsdelivr.net/npm/screenfull@5.1.0/dist/screenfull.js) | x | Screenfull js url |
|
|
66
|
+
| previewTheme<sup>v1.4.3</sup> | 'default' \| 'github' \| 'vuepress' | 'default' | √ | Preview themes |
|
|
67
|
+
|
|
68
|
+
> If responsive is `x`, you can set it's default value once.
|
|
70
69
|
|
|
71
70
|
[toolbars]
|
|
72
71
|
|
|
@@ -75,6 +74,7 @@ vue3 项目下的 Markdown 编辑器,,使用 jsx 语法开发,支持在 ts
|
|
|
75
74
|
'bold',
|
|
76
75
|
'underline',
|
|
77
76
|
'italic',
|
|
77
|
+
'-',
|
|
78
78
|
'strikeThrough',
|
|
79
79
|
'title',
|
|
80
80
|
'sub',
|
|
@@ -82,14 +82,17 @@ vue3 项目下的 Markdown 编辑器,,使用 jsx 语法开发,支持在 ts
|
|
|
82
82
|
'quote',
|
|
83
83
|
'unorderedList',
|
|
84
84
|
'orderedList',
|
|
85
|
+
'-',
|
|
85
86
|
'codeRow',
|
|
86
87
|
'code',
|
|
87
88
|
'link',
|
|
88
89
|
'image',
|
|
89
90
|
'table',
|
|
91
|
+
'-',
|
|
90
92
|
'revoke',
|
|
91
93
|
'next',
|
|
92
94
|
'save',
|
|
95
|
+
'=',
|
|
93
96
|
'pageFullscreen',
|
|
94
97
|
'fullscreen',
|
|
95
98
|
'preview',
|
|
@@ -98,15 +101,17 @@ vue3 项目下的 Markdown 编辑器,,使用 jsx 语法开发,支持在 ts
|
|
|
98
101
|
];
|
|
99
102
|
```
|
|
100
103
|
|
|
101
|
-
|
|
104
|
+
> after v1.6.0, You can sort the toolbar as you like, split tools by `'-'`, the left and right toolbars are divided by `'='`!
|
|
105
|
+
|
|
106
|
+
Expand language,you need to replace all the content here:
|
|
102
107
|
|
|
103
108
|
[StaticTextDefaultValue]
|
|
104
109
|
|
|
105
110
|
```ts
|
|
106
111
|
export interface StaticTextDefaultValue {
|
|
107
|
-
//
|
|
112
|
+
// Toolbar hover tips(html title)
|
|
108
113
|
toolbarTips?: ToolbarTips;
|
|
109
|
-
//
|
|
114
|
+
// h1-h6 dropdown menu item
|
|
110
115
|
titleItem?: {
|
|
111
116
|
h1?: string;
|
|
112
117
|
h2?: string;
|
|
@@ -115,7 +120,13 @@ export interface StaticTextDefaultValue {
|
|
|
115
120
|
h5?: string;
|
|
116
121
|
h6?: string;
|
|
117
122
|
};
|
|
118
|
-
//
|
|
123
|
+
// v1.6.0
|
|
124
|
+
imgTitleItem?: {
|
|
125
|
+
link: string;
|
|
126
|
+
upload: string;
|
|
127
|
+
clip2upload: string;
|
|
128
|
+
};
|
|
129
|
+
// The modal tips of add link or upload picture
|
|
119
130
|
linkModalTips?: {
|
|
120
131
|
title?: string;
|
|
121
132
|
descLable?: string;
|
|
@@ -123,14 +134,13 @@ export interface StaticTextDefaultValue {
|
|
|
123
134
|
urlLable?: string;
|
|
124
135
|
UrlLablePlaceHolder?: string;
|
|
125
136
|
buttonOK?: string;
|
|
126
|
-
buttonUpload?: string;
|
|
127
137
|
};
|
|
128
|
-
//
|
|
138
|
+
// The modal tips of clip the picture,v1.2.0
|
|
129
139
|
clipModalTips?: {
|
|
130
140
|
title?: string;
|
|
131
141
|
buttonUpload?: string;
|
|
132
142
|
};
|
|
133
|
-
//
|
|
143
|
+
// Copy code tips,v1.1.4
|
|
134
144
|
copyCode?: {
|
|
135
145
|
text?: string;
|
|
136
146
|
tips?: string;
|
|
@@ -138,50 +148,49 @@ export interface StaticTextDefaultValue {
|
|
|
138
148
|
}
|
|
139
149
|
```
|
|
140
150
|
|
|
141
|
-
###
|
|
151
|
+
### Event
|
|
142
152
|
|
|
143
|
-
|
|
|
153
|
+
| name | params | description |
|
|
144
154
|
| --- | --- | --- |
|
|
145
|
-
| onChange | v:String |
|
|
146
|
-
| onSave | v:String |
|
|
147
|
-
| onUploadImg | files:FileList, callback:Function |
|
|
148
|
-
| onHtmlChanged | h:String |
|
|
149
|
-
| onGetCatalog<sup>v1.4.0</sup> | list: HeadList[] |
|
|
155
|
+
| onChange | v:String | Content changed event(bind to `oninput` of `textarea`) |
|
|
156
|
+
| onSave | v:String | Save Content event,`ctrl+s`and click button will trigger |
|
|
157
|
+
| onUploadImg | files:FileList, callback:Function | Upload picture event,when picture is uploading the modal will not close,please provide right urls to the callback function |
|
|
158
|
+
| onHtmlChanged | h:String | Compile markdown successful event,you can use it to get the html code |
|
|
159
|
+
| onGetCatalog<sup>v1.4.0</sup> | list: HeadList[] | Get catalogue of article |
|
|
160
|
+
| markedHeading<sup>[v1.6.0](https://github.com/imzbf/md-editor-v3/releases/tag/v1.6.0)</sup> | text: string,level: 1-6,raw: string, slugger: Slugger | `marked` head renderer methods |
|
|
150
161
|
|
|
151
|
-
###
|
|
162
|
+
### Shortcut key
|
|
152
163
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
| 键位 | 功能 | 说明 | 版本标记 |
|
|
164
|
+
| key | function | description | support |
|
|
156
165
|
| --- | --- | --- | --- |
|
|
157
|
-
| TAB |
|
|
158
|
-
| SHIFT + TAB |
|
|
159
|
-
| CTRL + C |
|
|
160
|
-
| CTRL + X |
|
|
161
|
-
| CTRL + D |
|
|
162
|
-
| CTRL + S |
|
|
163
|
-
| CTRL + B |
|
|
164
|
-
| CTRL + U |
|
|
165
|
-
| CTRL + I |
|
|
166
|
-
| CTRL + 1-6 |
|
|
167
|
-
| CTRL + ↑ |
|
|
168
|
-
| CTRL + ↓ |
|
|
169
|
-
| CTRL + Q |
|
|
170
|
-
| CTRL + O |
|
|
171
|
-
| CTRL + L |
|
|
172
|
-
| CTRL + Z |
|
|
173
|
-
| CTRL + SHIFT + S |
|
|
174
|
-
| CTRL + SHIFT + U |
|
|
175
|
-
| CTRL + SHIFT + C |
|
|
176
|
-
| CTRL + SHIFT + I |
|
|
177
|
-
| CTRL + SHIFT + Z |
|
|
178
|
-
| CTRL + SHIFT + F |
|
|
179
|
-
| CTRL + ALT + C |
|
|
180
|
-
| CTRL + SHIFT + ALT + T |
|
|
181
|
-
|
|
182
|
-
##
|
|
183
|
-
|
|
184
|
-
###
|
|
166
|
+
| TAB | insert space | Insert space, the length eq `tabWidth`, default: 2, support multiline | v1.4.0 |
|
|
167
|
+
| SHIFT + TAB | delete space, setting is the same as Tab | | v1.4.0 |
|
|
168
|
+
| CTRL + C | copy | When selected, copy the selected content. When not selected, copy the content of the current line | v1.4.0 |
|
|
169
|
+
| CTRL + X | shear | When selected, cut the selected content. When not selected, cut the current line | v1.4.0 |
|
|
170
|
+
| CTRL + D | delete | When selected, delete the selected content. When not selected, delete the current line | v1.4.0 |
|
|
171
|
+
| CTRL + S | save | Trigger `onSave` event | v1.0.0 |
|
|
172
|
+
| CTRL + B | bold text | `**bold**` | v1.0.0 |
|
|
173
|
+
| CTRL + U | underline | `<u>underline</u>` | v1.0.0 |
|
|
174
|
+
| CTRL + I | italic | `*italic*` | v1.0.0 |
|
|
175
|
+
| CTRL + 1-6 | h1-h6 | `# title` | v1.0.0 |
|
|
176
|
+
| CTRL + ↑ | superscript | `<sup>superscript</sup>` | v1.0.0 |
|
|
177
|
+
| CTRL + ↓ | subscript | `<sub>subscript</sub>` | v1.0.0 |
|
|
178
|
+
| CTRL + Q | quote | `> quote` | v1.0.0 |
|
|
179
|
+
| CTRL + O | ordered list | `1. ordered list` | v1.0.0 |
|
|
180
|
+
| CTRL + L | link | `[link](https://github.com/imzbf/md-editor-v3)` | v1.0.0 |
|
|
181
|
+
| CTRL + Z | withdraw | Withdraw history in editor, not the function of system | v1.0.0 |
|
|
182
|
+
| CTRL + SHIFT + S | line-through | `~line-through~` | v1.0.0 |
|
|
183
|
+
| CTRL + SHIFT + U | unordered list | `- unordered list` | v1.0.0 |
|
|
184
|
+
| CTRL + SHIFT + C | code block | | v1.0.0 |
|
|
185
|
+
| CTRL + SHIFT + I | picture | `` | v1.0.0 |
|
|
186
|
+
| CTRL + SHIFT + Z | forward | Forward history in editor, not the function of system | v1.0.0 |
|
|
187
|
+
| CTRL + SHIFT + F | Beautify | | v1.0.0 |
|
|
188
|
+
| CTRL + ALT + C | code row | | v1.0.0 |
|
|
189
|
+
| CTRL + SHIFT + ALT + T | table | `\|table\|` | v1.4.0 |
|
|
190
|
+
|
|
191
|
+
## Simple demo
|
|
192
|
+
|
|
193
|
+
### Jsx module
|
|
185
194
|
|
|
186
195
|
```js
|
|
187
196
|
import { defineComponent, reactive } from 'vue';
|
|
@@ -202,7 +211,7 @@ export default defineComponent({
|
|
|
202
211
|
});
|
|
203
212
|
```
|
|
204
213
|
|
|
205
|
-
###
|
|
214
|
+
### Vue template
|
|
206
215
|
|
|
207
216
|
```js
|
|
208
217
|
<template>
|
|
@@ -219,7 +228,7 @@ export default defineComponent({
|
|
|
219
228
|
components: { Editor },
|
|
220
229
|
data() {
|
|
221
230
|
return {
|
|
222
|
-
text: '
|
|
231
|
+
text: '# md-editor-v3'
|
|
223
232
|
};
|
|
224
233
|
}
|
|
225
234
|
});
|
|
@@ -227,11 +236,9 @@ export default defineComponent({
|
|
|
227
236
|
|
|
228
237
|
```
|
|
229
238
|
|
|
230
|
-
###
|
|
231
|
-
|
|
232
|
-
默认可以选择多张图片,支持粘贴板上传图片。
|
|
239
|
+
### Upload picture
|
|
233
240
|
|
|
234
|
-
>
|
|
241
|
+
> Tips:When you paste and upload GIF,it will upload a static picture. So you should upload it by file system!
|
|
235
242
|
|
|
236
243
|
```js
|
|
237
244
|
async onUploadImg(files: FileList, callback: (urls: string[]) => void) {
|
|
@@ -256,3 +263,11 @@ async onUploadImg(files: FileList, callback: (urls: string[]) => void) {
|
|
|
256
263
|
callback(res.map((item: any) => item.data.url));
|
|
257
264
|
}
|
|
258
265
|
```
|
|
266
|
+
|
|
267
|
+
## Support
|
|
268
|
+
|
|
269
|
+
> Refund can be made through the contact information above(Please do not operate maliciously).
|
|
270
|
+
|
|
271
|
+
| Alipay | WeChat |
|
|
272
|
+
| --- | --- |
|
|
273
|
+
|  |  |
|
package/lib/MdEditor/Editor.d.ts
CHANGED
|
@@ -33,6 +33,8 @@ export interface ToolbarTips {
|
|
|
33
33
|
preview?: string;
|
|
34
34
|
htmlPreview?: string;
|
|
35
35
|
github?: string;
|
|
36
|
+
'-'?: string;
|
|
37
|
+
'='?: string;
|
|
36
38
|
}
|
|
37
39
|
export interface StaticTextDefaultValue {
|
|
38
40
|
toolbarTips?: ToolbarTips;
|
|
@@ -44,6 +46,11 @@ export interface StaticTextDefaultValue {
|
|
|
44
46
|
h5?: string;
|
|
45
47
|
h6?: string;
|
|
46
48
|
};
|
|
49
|
+
imgTitleItem?: {
|
|
50
|
+
link: string;
|
|
51
|
+
upload: string;
|
|
52
|
+
clip2upload: string;
|
|
53
|
+
};
|
|
47
54
|
linkModalTips?: {
|
|
48
55
|
title?: string;
|
|
49
56
|
descLable?: string;
|
|
@@ -51,8 +58,6 @@ export interface StaticTextDefaultValue {
|
|
|
51
58
|
urlLable?: string;
|
|
52
59
|
UrlLablePlaceHolder?: string;
|
|
53
60
|
buttonOK?: string;
|
|
54
|
-
buttonUpload?: string;
|
|
55
|
-
buttonUploadClip?: string;
|
|
56
61
|
};
|
|
57
62
|
clipModalTips?: {
|
|
58
63
|
title?: string;
|
|
@@ -81,6 +86,14 @@ export interface HeadList {
|
|
|
81
86
|
level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
82
87
|
}
|
|
83
88
|
export declare type PreviewThemes = 'default' | 'github' | 'vuepress';
|
|
89
|
+
export declare type MarkedHeading = (text: string, level: 1 | 2 | 3 | 4 | 5 | 6, raw: string, slugger: {
|
|
90
|
+
seen: {
|
|
91
|
+
[slugValue: string]: number;
|
|
92
|
+
};
|
|
93
|
+
slug(value: string, options?: {
|
|
94
|
+
dryrun: boolean;
|
|
95
|
+
}): string;
|
|
96
|
+
}) => string;
|
|
84
97
|
declare const _default: import("vue").DefineComponent<{
|
|
85
98
|
modelValue: {
|
|
86
99
|
type: PropType<string>;
|
|
@@ -142,8 +155,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
142
155
|
languageUserDefined: {
|
|
143
156
|
type: PropType<{
|
|
144
157
|
[key: string]: StaticTextDefaultValue;
|
|
145
|
-
}
|
|
146
|
-
default: () =>
|
|
158
|
+
}>;
|
|
159
|
+
default: () => {};
|
|
147
160
|
};
|
|
148
161
|
toolbars: {
|
|
149
162
|
type: PropType<(keyof ToolbarTips)[]>;
|
|
@@ -211,6 +224,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
211
224
|
type: PropType<PreviewThemes>;
|
|
212
225
|
default: string;
|
|
213
226
|
};
|
|
227
|
+
markedHeading: {
|
|
228
|
+
type: PropType<MarkedHeading>;
|
|
229
|
+
default: (text: string, level: string) => string;
|
|
230
|
+
};
|
|
214
231
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
215
232
|
modelValue?: unknown;
|
|
216
233
|
theme?: unknown;
|
|
@@ -245,73 +262,76 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
245
262
|
screenfull?: unknown;
|
|
246
263
|
screenfullJs?: unknown;
|
|
247
264
|
previewTheme?: unknown;
|
|
265
|
+
markedHeading?: unknown;
|
|
248
266
|
} & {
|
|
267
|
+
editorId: string;
|
|
249
268
|
prettier: boolean;
|
|
250
269
|
preview: boolean;
|
|
251
270
|
htmlPreview: boolean;
|
|
252
|
-
tabWidth: number;
|
|
253
|
-
editorId: string;
|
|
254
271
|
previewOnly: boolean;
|
|
272
|
+
tabWidth: number;
|
|
255
273
|
showCodeRowNumber: boolean;
|
|
256
274
|
Cropper: Function;
|
|
257
275
|
historyLength: number;
|
|
258
276
|
previewTheme: PreviewThemes;
|
|
259
|
-
screenfull: Record<string, any>;
|
|
260
|
-
pageFullScreen: boolean;
|
|
261
|
-
toolbars: (keyof ToolbarTips)[];
|
|
262
|
-
toolbarsExclude: (keyof ToolbarTips)[];
|
|
263
|
-
screenfullJs: string;
|
|
264
|
-
hljs: Record<string, any>;
|
|
265
277
|
modelValue: string;
|
|
266
278
|
theme: "dark" | "light";
|
|
267
279
|
editorClass: string;
|
|
280
|
+
hljs: Record<string, any>;
|
|
268
281
|
highlightJs: string;
|
|
269
282
|
highlightCss: string;
|
|
283
|
+
pageFullScreen: boolean;
|
|
270
284
|
language: string;
|
|
271
285
|
languageUserDefined: {
|
|
272
286
|
[key: string]: StaticTextDefaultValue;
|
|
273
|
-
}
|
|
287
|
+
};
|
|
288
|
+
toolbars: (keyof ToolbarTips)[];
|
|
289
|
+
toolbarsExclude: (keyof ToolbarTips)[];
|
|
274
290
|
prettierCDN: string;
|
|
275
291
|
prettierMDCDN: string;
|
|
276
292
|
cropperCss: string;
|
|
277
293
|
cropperJs: string;
|
|
278
294
|
iconfontJs: string;
|
|
295
|
+
screenfull: Record<string, any>;
|
|
296
|
+
screenfullJs: string;
|
|
297
|
+
markedHeading: MarkedHeading;
|
|
279
298
|
} & {
|
|
280
299
|
onSave?: ((v: string) => void) | undefined;
|
|
281
300
|
onChange?: ((v: string) => void) | undefined;
|
|
301
|
+
onUploadImg?: ((files: FileList, callBack: (urls: string[]) => void) => void) | undefined;
|
|
282
302
|
onHtmlChanged?: ((h: string) => void) | undefined;
|
|
283
303
|
onGetCatalog?: ((list: HeadList[]) => void) | undefined;
|
|
284
|
-
onUploadImg?: ((files: FileList, callBack: (urls: string[]) => void) => void) | undefined;
|
|
285
304
|
}>, {
|
|
305
|
+
editorId: string;
|
|
286
306
|
prettier: boolean;
|
|
287
307
|
preview: boolean;
|
|
288
308
|
htmlPreview: boolean;
|
|
289
|
-
tabWidth: number;
|
|
290
|
-
editorId: string;
|
|
291
309
|
previewOnly: boolean;
|
|
310
|
+
tabWidth: number;
|
|
292
311
|
showCodeRowNumber: boolean;
|
|
293
312
|
Cropper: Function;
|
|
294
313
|
historyLength: number;
|
|
295
314
|
previewTheme: PreviewThemes;
|
|
296
|
-
screenfull: Record<string, any>;
|
|
297
|
-
pageFullScreen: boolean;
|
|
298
|
-
toolbars: (keyof ToolbarTips)[];
|
|
299
|
-
toolbarsExclude: (keyof ToolbarTips)[];
|
|
300
|
-
screenfullJs: string;
|
|
301
|
-
hljs: Record<string, any>;
|
|
302
315
|
modelValue: string;
|
|
303
316
|
theme: "dark" | "light";
|
|
304
317
|
editorClass: string;
|
|
318
|
+
hljs: Record<string, any>;
|
|
305
319
|
highlightJs: string;
|
|
306
320
|
highlightCss: string;
|
|
321
|
+
pageFullScreen: boolean;
|
|
307
322
|
language: string;
|
|
308
323
|
languageUserDefined: {
|
|
309
324
|
[key: string]: StaticTextDefaultValue;
|
|
310
|
-
}
|
|
325
|
+
};
|
|
326
|
+
toolbars: (keyof ToolbarTips)[];
|
|
327
|
+
toolbarsExclude: (keyof ToolbarTips)[];
|
|
311
328
|
prettierCDN: string;
|
|
312
329
|
prettierMDCDN: string;
|
|
313
330
|
cropperCss: string;
|
|
314
331
|
cropperJs: string;
|
|
315
332
|
iconfontJs: string;
|
|
333
|
+
screenfull: Record<string, any>;
|
|
334
|
+
screenfullJs: string;
|
|
335
|
+
markedHeading: MarkedHeading;
|
|
316
336
|
}>;
|
|
317
337
|
export default _default;
|