md-editor-v3 1.8.0 → 1.10.0
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 +49 -27
- package/lib/MdEditor/DropdownToolbar.d.ts +42 -0
- package/lib/MdEditor/Editor.d.ts +215 -201
- package/lib/MdEditor/NormalToolbar.d.ts +30 -0
- package/lib/MdEditor/index.d.ts +919 -0
- package/lib/MdEditor/type.d.ts +113 -0
- package/lib/md-editor-v3.es.js +964 -603
- package/lib/md-editor-v3.umd.js +45 -41
- package/lib/style.css +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
English \| [中文](https://github.com/imzbf/md-editor-v3/blob/dev/README-CN.md)
|
|
6
6
|
|
|
7
|
-
Markdown editor for vue3, developed
|
|
7
|
+
Markdown editor for vue3, developed in `jsx` and `typescript`.
|
|
8
8
|
|
|
9
|
-
- Documentation and
|
|
9
|
+
- Documentation and example:[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
|
|
|
@@ -22,7 +22,8 @@ Markdown editor for vue3, developed by `jsx` and `typescript`.
|
|
|
22
22
|
- Upload picture, paste or clip the picture and upload it.
|
|
23
23
|
- Render article directly(no editor,no event listener, only preview content).
|
|
24
24
|
- Preview themes, support `defalut`、`vuepress`、`github` styles(not identical).
|
|
25
|
-
- `mermaid`(>=1.
|
|
25
|
+
- `mermaid`(>=1.8.0).
|
|
26
|
+
- `katex` mathematical formula(>=1.9.0).
|
|
26
27
|
|
|
27
28
|
> More features are developing, if you have some ideas or find issues, please tell it to me~
|
|
28
29
|
|
|
@@ -37,7 +38,7 @@ Markdown editor for vue3, developed by `jsx` and `typescript`.
|
|
|
37
38
|
### Props
|
|
38
39
|
|
|
39
40
|
| name | type | default | description |
|
|
40
|
-
| --- | --- | --- | --- |
|
|
41
|
+
| --- | --- | --- | --- | --- |
|
|
41
42
|
| modelValue | String | '' | Markdown content,use `v-model` in vue template |
|
|
42
43
|
| theme | 'light' \| 'dark' | 'light' | Change editor theme |
|
|
43
44
|
| editorClass | String | '' | |
|
|
@@ -48,29 +49,39 @@ Markdown editor for vue3, developed by `jsx` and `typescript`.
|
|
|
48
49
|
| pageFullScreen | Boolean | false | Screenfull in web page |
|
|
49
50
|
| preview | Boolean | true | Preview content in editor |
|
|
50
51
|
| htmlPreview | Boolean | false | Preview html in editor |
|
|
51
|
-
| previewOnly
|
|
52
|
+
| previewOnly | Boolean | false | Only render article content, no toolbar, no edit area |
|
|
52
53
|
| language | String | 'zh-CN' | Build-in language('zh-CN','en-US') |
|
|
53
|
-
| languageUserDefined
|
|
54
|
+
| languageUserDefined | Object | {key: StaticTextDefaultValue} | Expand language,update `language` api to your key |
|
|
54
55
|
| toolbars | Array | [toolbars] | Show some item of toolbars,all keys<sup>see `toolbars` below<sup> |
|
|
55
|
-
| toolbarsExclude
|
|
56
|
+
| toolbarsExclude | Array | [] | Don't show some item of toolbars,all keys`toolbars` |
|
|
56
57
|
| prettier | Boolean | true | Use prettier to beautify content or not |
|
|
57
58
|
| prettierCDN | String | [standalone@2.4.0](https://cdn.jsdelivr.net/npm/prettier@2.4.0/standalone.js) | |
|
|
58
59
|
| prettierMDCDN | String | [parser-markdown@2.4.0](https://cdn.jsdelivr.net/npm/prettier@2.4.0/parser-markdown.js) | |
|
|
59
|
-
| cropperCss
|
|
60
|
-
| cropperJs
|
|
61
|
-
| iconfontJs
|
|
62
|
-
| editorId
|
|
63
|
-
| tabWidth
|
|
64
|
-
| showCodeRowNumber
|
|
65
|
-
| screenfull
|
|
66
|
-
| screenfullJs
|
|
67
|
-
| previewTheme
|
|
68
|
-
| style
|
|
69
|
-
| tableShape
|
|
70
|
-
| mermaid
|
|
71
|
-
| mermaidJs
|
|
72
|
-
| noMermaid
|
|
73
|
-
| placeholder
|
|
60
|
+
| cropperCss | String | [cropper.min.css@1.5.12](https://cdn.jsdelivr.net/npm/cropperjs@1.5.12/dist/cropper.min.css) | Cropper css url |
|
|
61
|
+
| cropperJs | String | [cropper.min.js@1.5.12](https://cdn.jsdelivr.net/npm/cropperjs@1.5.12/dist/cropper.min.js) | Cropper js url |
|
|
62
|
+
| iconfontJs | String | [iconfont](https://at.alicdn.com/t/font_2605852_khjf435c7th.js) | Icon url |
|
|
63
|
+
| editorId | String | md-editor-v3 | Editor id, also the html id, it is used when there are more than two editors |
|
|
64
|
+
| tabWidth | Number | 2 | One tab eq some space |
|
|
65
|
+
| showCodeRowNumber | Boolean | false | Show row number for code block or not |
|
|
66
|
+
| screenfull | Object | null | Screenfull instance, editor will not insert script of it |
|
|
67
|
+
| screenfullJs | String | [screenfull@5.1.0](https://cdn.jsdelivr.net/npm/screenfull@5.1.0/dist/screenfull.js) | Screenfull js url |
|
|
68
|
+
| previewTheme | 'default' \| 'github' \| 'vuepress' | 'default' | Preview themes |
|
|
69
|
+
| style | CSSProperties | {} | Editor's inline style |
|
|
70
|
+
| tableShape | [Number, Number] | [6, 4] | Preset the size of the table, [columns, rows]. |
|
|
71
|
+
| mermaid | Object | undefined | `mermaid` instance |
|
|
72
|
+
| mermaidJs | String | [mermaid@8.13.5](https://cdn.jsdelivr.net/npm/mermaid@8.13.5/dist/mermaid.min.js) | MermaidJs url |
|
|
73
|
+
| noMermaid | Boolean | false | Do not use mermaid |
|
|
74
|
+
| placeholder | String | '' | |
|
|
75
|
+
| katex | Object | undefined | `katex` instance(you need import css by yourself.) |
|
|
76
|
+
| katexJs | String | [katex.min.js@0.15.1](https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.js) | KatexJs url |
|
|
77
|
+
| katexCss | String | [katex.min.css@0.15.1](https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css) | KatexCss url |
|
|
78
|
+
| noKatex | Boolean | false | Do not use katex |
|
|
79
|
+
| defToolbars | Array<DropdownToolbar | NormalToolbar> | null | Customize Toolbar, for more usage, please refer to [docs](https://imzbf.github.io/md-editor-v3/docs/index#%F0%9F%92%AA%20defToolbars) and [emoji](https://imzbf.github.io/md-editor-v3/demo/index#💪%20Customize%20Toolbar) |
|
|
80
|
+
| extensions | Array<Object> | null | [marked](https://marked.js.org/using_pro#extensions) extensions |
|
|
81
|
+
|
|
82
|
+
mark and emoji extensions
|
|
83
|
+
|
|
84
|
+

|
|
74
85
|
|
|
75
86
|
[toolbars]
|
|
76
87
|
|
|
@@ -94,6 +105,7 @@ Markdown editor for vue3, developed by `jsx` and `typescript`.
|
|
|
94
105
|
'image',
|
|
95
106
|
'table',
|
|
96
107
|
'mermaid',
|
|
108
|
+
'katex',
|
|
97
109
|
'-',
|
|
98
110
|
'revoke',
|
|
99
111
|
'next',
|
|
@@ -108,7 +120,9 @@ Markdown editor for vue3, developed by `jsx` and `typescript`.
|
|
|
108
120
|
];
|
|
109
121
|
```
|
|
110
122
|
|
|
111
|
-
>
|
|
123
|
+
> After v1.6.0, You can sort the toolbar as you like, split tools by `'-'`, the left and right toolbars are divided by `'='`!
|
|
124
|
+
|
|
125
|
+
> After v1.10.0, you can customize the toolbar. To display them, put index of `defToolbars` into `toolbars`(this is not standard), for more usage, please refer to[docs]().
|
|
112
126
|
|
|
113
127
|
Expand language,you need to replace all the content here:
|
|
114
128
|
|
|
@@ -132,6 +146,7 @@ export interface ToolbarTips {
|
|
|
132
146
|
image?: string;
|
|
133
147
|
table?: string;
|
|
134
148
|
mermaid?: string;
|
|
149
|
+
katex?: string;
|
|
135
150
|
revoke?: string;
|
|
136
151
|
next?: string;
|
|
137
152
|
save?: string;
|
|
@@ -194,6 +209,13 @@ export interface StaticTextDefaultValue {
|
|
|
194
209
|
relationship?: string;
|
|
195
210
|
journey?: string;
|
|
196
211
|
};
|
|
212
|
+
// 1.9.0
|
|
213
|
+
katex?: {
|
|
214
|
+
// formula inline
|
|
215
|
+
inline: string;
|
|
216
|
+
// formula block
|
|
217
|
+
block: string;
|
|
218
|
+
};
|
|
197
219
|
}
|
|
198
220
|
```
|
|
199
221
|
|
|
@@ -205,9 +227,9 @@ export interface StaticTextDefaultValue {
|
|
|
205
227
|
| onSave | v:String | Save Content event,`ctrl+s`and click button will trigger |
|
|
206
228
|
| 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 |
|
|
207
229
|
| onHtmlChanged | h:String | Compile markdown successful event,you can use it to get the html code |
|
|
208
|
-
| onGetCatalog
|
|
209
|
-
| markedHeading
|
|
210
|
-
| markedHeadingId
|
|
230
|
+
| onGetCatalog | list: HeadList[] | Get catalogue of article |
|
|
231
|
+
| markedHeading | text: string,level: 1-6,raw: string, slugger: Slugger | `marked` head renderer methods |
|
|
232
|
+
| markedHeadingId | (text: string, level: number) => string | title `ID` generator |
|
|
211
233
|
| sanitize | (html: string) => string | Sanitize the html, prevent XSS. |
|
|
212
234
|
|
|
213
235
|
> If `markedHeading` is overridden, be sure to tell the editor the algorithm for generating the title ID by `marketheadingid`.
|
|
@@ -241,7 +263,7 @@ export interface StaticTextDefaultValue {
|
|
|
241
263
|
| CTRL + ALT + C | code row | | v1.0.0 |
|
|
242
264
|
| CTRL + SHIFT + ALT + T | table | `\|table\|` | v1.4.0 |
|
|
243
265
|
|
|
244
|
-
## Simple
|
|
266
|
+
## Simple example
|
|
245
267
|
|
|
246
268
|
### Jsx module
|
|
247
269
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
title: {
|
|
4
|
+
type: PropType<string>;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
visible: {
|
|
8
|
+
type: PropType<boolean>;
|
|
9
|
+
};
|
|
10
|
+
trigger: {
|
|
11
|
+
type: PropType<string | JSX.Element>;
|
|
12
|
+
};
|
|
13
|
+
onChange: {
|
|
14
|
+
type: PropType<(visible: boolean) => void>;
|
|
15
|
+
default: () => () => void;
|
|
16
|
+
};
|
|
17
|
+
overlay: {
|
|
18
|
+
type: PropType<string | JSX.Element>;
|
|
19
|
+
};
|
|
20
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
title: {
|
|
22
|
+
type: PropType<string>;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
visible: {
|
|
26
|
+
type: PropType<boolean>;
|
|
27
|
+
};
|
|
28
|
+
trigger: {
|
|
29
|
+
type: PropType<string | JSX.Element>;
|
|
30
|
+
};
|
|
31
|
+
onChange: {
|
|
32
|
+
type: PropType<(visible: boolean) => void>;
|
|
33
|
+
default: () => () => void;
|
|
34
|
+
};
|
|
35
|
+
overlay: {
|
|
36
|
+
type: PropType<string | JSX.Element>;
|
|
37
|
+
};
|
|
38
|
+
}>>, {
|
|
39
|
+
title: string;
|
|
40
|
+
onChange: (visible: boolean) => void;
|
|
41
|
+
}>;
|
|
42
|
+
export default _default;
|
package/lib/MdEditor/Editor.d.ts
CHANGED
|
@@ -1,113 +1,6 @@
|
|
|
1
1
|
import { PropType, CSSProperties } from 'vue';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
hljs: any;
|
|
5
|
-
prettier: any;
|
|
6
|
-
prettierPlugins: any;
|
|
7
|
-
Cropper: any;
|
|
8
|
-
screenfull: any;
|
|
9
|
-
mermaid: any;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
export interface ToolbarTips {
|
|
13
|
-
bold?: string;
|
|
14
|
-
underline?: string;
|
|
15
|
-
italic?: string;
|
|
16
|
-
strikeThrough?: string;
|
|
17
|
-
title?: string;
|
|
18
|
-
sub?: string;
|
|
19
|
-
sup?: string;
|
|
20
|
-
quote?: string;
|
|
21
|
-
unorderedList?: string;
|
|
22
|
-
orderedList?: string;
|
|
23
|
-
codeRow?: string;
|
|
24
|
-
code?: string;
|
|
25
|
-
link?: string;
|
|
26
|
-
image?: string;
|
|
27
|
-
table?: string;
|
|
28
|
-
mermaid?: string;
|
|
29
|
-
revoke?: string;
|
|
30
|
-
next?: string;
|
|
31
|
-
save?: string;
|
|
32
|
-
prettier?: string;
|
|
33
|
-
pageFullscreen?: string;
|
|
34
|
-
fullscreen?: string;
|
|
35
|
-
preview?: string;
|
|
36
|
-
htmlPreview?: string;
|
|
37
|
-
catalog?: string;
|
|
38
|
-
github?: string;
|
|
39
|
-
'-'?: string;
|
|
40
|
-
'='?: string;
|
|
41
|
-
}
|
|
42
|
-
export interface StaticTextDefaultValue {
|
|
43
|
-
toolbarTips?: ToolbarTips;
|
|
44
|
-
titleItem?: {
|
|
45
|
-
h1?: string;
|
|
46
|
-
h2?: string;
|
|
47
|
-
h3?: string;
|
|
48
|
-
h4?: string;
|
|
49
|
-
h5?: string;
|
|
50
|
-
h6?: string;
|
|
51
|
-
};
|
|
52
|
-
imgTitleItem?: {
|
|
53
|
-
link: string;
|
|
54
|
-
upload: string;
|
|
55
|
-
clip2upload: string;
|
|
56
|
-
};
|
|
57
|
-
linkModalTips?: {
|
|
58
|
-
title?: string;
|
|
59
|
-
descLable?: string;
|
|
60
|
-
descLablePlaceHolder?: string;
|
|
61
|
-
urlLable?: string;
|
|
62
|
-
UrlLablePlaceHolder?: string;
|
|
63
|
-
buttonOK?: string;
|
|
64
|
-
};
|
|
65
|
-
clipModalTips?: {
|
|
66
|
-
title?: string;
|
|
67
|
-
buttonUpload?: string;
|
|
68
|
-
};
|
|
69
|
-
copyCode?: {
|
|
70
|
-
text?: string;
|
|
71
|
-
tips?: string;
|
|
72
|
-
};
|
|
73
|
-
mermaid?: {
|
|
74
|
-
flow?: string;
|
|
75
|
-
sequence?: string;
|
|
76
|
-
gantt?: string;
|
|
77
|
-
class?: string;
|
|
78
|
-
state?: string;
|
|
79
|
-
pie?: string;
|
|
80
|
-
relationship?: string;
|
|
81
|
-
journey?: string;
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
export interface StaticTextDefault {
|
|
85
|
-
'zh-CN': StaticTextDefaultValue;
|
|
86
|
-
'en-US': StaticTextDefaultValue;
|
|
87
|
-
}
|
|
88
|
-
export declare type StaticTextDefaultKey = keyof StaticTextDefault;
|
|
89
|
-
export declare type ToolbarNames = keyof ToolbarTips;
|
|
90
|
-
export interface SettingType {
|
|
91
|
-
pageFullScreen: boolean;
|
|
92
|
-
fullscreen: boolean;
|
|
93
|
-
preview: boolean;
|
|
94
|
-
htmlPreview: boolean;
|
|
95
|
-
}
|
|
96
|
-
export declare const prefix = "md";
|
|
97
|
-
export interface HeadList {
|
|
98
|
-
text: string;
|
|
99
|
-
level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
100
|
-
}
|
|
101
|
-
export declare type PreviewThemes = 'default' | 'github' | 'vuepress';
|
|
102
|
-
export declare type MarkedHeading = (text: string, level: 1 | 2 | 3 | 4 | 5 | 6, raw: string, slugger: {
|
|
103
|
-
seen: {
|
|
104
|
-
[slugValue: string]: number;
|
|
105
|
-
};
|
|
106
|
-
slug(value: string, options?: {
|
|
107
|
-
dryrun: boolean;
|
|
108
|
-
}): string;
|
|
109
|
-
}) => string;
|
|
110
|
-
export declare type MarkedHeadingId = (text: string, level: number) => string;
|
|
2
|
+
import { StaticTextDefaultValue, ToolbarNames, HeadList, PreviewThemes, MarkedHeading, MarkedHeadingId } from './type';
|
|
3
|
+
export declare const markedHeadingId: MarkedHeadingId;
|
|
111
4
|
declare const _default: import("vue").DefineComponent<{
|
|
112
5
|
modelValue: {
|
|
113
6
|
type: PropType<string>;
|
|
@@ -173,11 +66,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
173
66
|
default: () => {};
|
|
174
67
|
};
|
|
175
68
|
toolbars: {
|
|
176
|
-
type: PropType<
|
|
69
|
+
type: PropType<ToolbarNames[]>;
|
|
177
70
|
default: string[];
|
|
178
71
|
};
|
|
179
72
|
toolbarsExclude: {
|
|
180
|
-
type: PropType<
|
|
73
|
+
type: PropType<ToolbarNames[]>;
|
|
181
74
|
default: never[];
|
|
182
75
|
};
|
|
183
76
|
prettier: {
|
|
@@ -273,96 +166,214 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
273
166
|
type: PropType<string>;
|
|
274
167
|
default: string;
|
|
275
168
|
};
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
169
|
+
katex: {
|
|
170
|
+
type: ObjectConstructor;
|
|
171
|
+
};
|
|
172
|
+
katexJs: {
|
|
173
|
+
type: PropType<string>;
|
|
174
|
+
default: string;
|
|
175
|
+
};
|
|
176
|
+
katexCss: {
|
|
177
|
+
type: PropType<string>;
|
|
178
|
+
default: string;
|
|
179
|
+
};
|
|
180
|
+
noKatex: {
|
|
181
|
+
type: PropType<boolean>;
|
|
182
|
+
default: boolean;
|
|
183
|
+
};
|
|
184
|
+
defToolbars: {
|
|
185
|
+
type: PropType<string | JSX.Element>;
|
|
186
|
+
};
|
|
187
|
+
extensions: {
|
|
188
|
+
type: PropType<any[]>;
|
|
189
|
+
};
|
|
190
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
191
|
+
modelValue: {
|
|
192
|
+
type: PropType<string>;
|
|
193
|
+
default: string;
|
|
194
|
+
};
|
|
195
|
+
theme: {
|
|
196
|
+
type: PropType<"dark" | "light">;
|
|
197
|
+
default: string;
|
|
198
|
+
};
|
|
199
|
+
editorClass: {
|
|
200
|
+
type: StringConstructor;
|
|
201
|
+
default: string;
|
|
202
|
+
};
|
|
203
|
+
hljs: {
|
|
204
|
+
type: ObjectConstructor;
|
|
205
|
+
default: null;
|
|
206
|
+
};
|
|
207
|
+
highlightJs: {
|
|
208
|
+
type: PropType<string>;
|
|
209
|
+
default: string;
|
|
210
|
+
};
|
|
211
|
+
highlightCss: {
|
|
212
|
+
type: PropType<string>;
|
|
213
|
+
default: string;
|
|
214
|
+
};
|
|
215
|
+
historyLength: {
|
|
216
|
+
type: PropType<number>;
|
|
217
|
+
default: number;
|
|
218
|
+
};
|
|
219
|
+
onChange: {
|
|
220
|
+
type: PropType<(v: string) => void>;
|
|
221
|
+
};
|
|
222
|
+
onSave: {
|
|
223
|
+
type: PropType<(v: string) => void>;
|
|
224
|
+
};
|
|
225
|
+
onUploadImg: {
|
|
226
|
+
type: PropType<(files: FileList, callBack: (urls: string[]) => void) => void>;
|
|
227
|
+
};
|
|
228
|
+
pageFullScreen: {
|
|
229
|
+
type: PropType<boolean>;
|
|
230
|
+
default: boolean;
|
|
231
|
+
};
|
|
232
|
+
preview: {
|
|
233
|
+
type: PropType<boolean>;
|
|
234
|
+
default: boolean;
|
|
235
|
+
};
|
|
236
|
+
htmlPreview: {
|
|
237
|
+
type: PropType<boolean>;
|
|
238
|
+
default: boolean;
|
|
239
|
+
};
|
|
240
|
+
previewOnly: {
|
|
241
|
+
type: PropType<boolean>;
|
|
242
|
+
default: boolean;
|
|
243
|
+
};
|
|
244
|
+
language: {
|
|
245
|
+
type: PropType<string>;
|
|
246
|
+
default: string;
|
|
247
|
+
};
|
|
339
248
|
languageUserDefined: {
|
|
340
|
-
|
|
249
|
+
type: PropType<{
|
|
250
|
+
[key: string]: StaticTextDefaultValue;
|
|
251
|
+
}>;
|
|
252
|
+
default: () => {};
|
|
341
253
|
};
|
|
342
|
-
toolbars:
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
254
|
+
toolbars: {
|
|
255
|
+
type: PropType<ToolbarNames[]>;
|
|
256
|
+
default: string[];
|
|
257
|
+
};
|
|
258
|
+
toolbarsExclude: {
|
|
259
|
+
type: PropType<ToolbarNames[]>;
|
|
260
|
+
default: never[];
|
|
261
|
+
};
|
|
262
|
+
prettier: {
|
|
263
|
+
type: PropType<boolean>;
|
|
264
|
+
default: boolean;
|
|
265
|
+
};
|
|
266
|
+
prettierCDN: {
|
|
267
|
+
type: PropType<string>;
|
|
268
|
+
default: string;
|
|
269
|
+
};
|
|
270
|
+
prettierMDCDN: {
|
|
271
|
+
type: PropType<string>;
|
|
272
|
+
default: string;
|
|
273
|
+
};
|
|
274
|
+
onHtmlChanged: {
|
|
275
|
+
type: PropType<(h: string) => void>;
|
|
276
|
+
};
|
|
277
|
+
Cropper: {
|
|
278
|
+
type: FunctionConstructor;
|
|
279
|
+
default: null;
|
|
280
|
+
};
|
|
281
|
+
cropperCss: {
|
|
282
|
+
type: PropType<string>;
|
|
283
|
+
default: string;
|
|
284
|
+
};
|
|
285
|
+
cropperJs: {
|
|
286
|
+
type: PropType<string>;
|
|
287
|
+
default: string;
|
|
288
|
+
};
|
|
289
|
+
iconfontJs: {
|
|
290
|
+
type: PropType<string>;
|
|
291
|
+
default: string;
|
|
292
|
+
};
|
|
293
|
+
onGetCatalog: {
|
|
294
|
+
type: PropType<(list: HeadList[]) => void>;
|
|
295
|
+
};
|
|
296
|
+
editorId: {
|
|
297
|
+
type: PropType<string>;
|
|
298
|
+
default: string;
|
|
299
|
+
};
|
|
300
|
+
tabWidth: {
|
|
301
|
+
type: PropType<number>;
|
|
302
|
+
default: number;
|
|
303
|
+
};
|
|
304
|
+
showCodeRowNumber: {
|
|
305
|
+
type: PropType<boolean>;
|
|
306
|
+
default: boolean;
|
|
307
|
+
};
|
|
308
|
+
screenfull: {
|
|
309
|
+
type: ObjectConstructor;
|
|
310
|
+
default: null;
|
|
311
|
+
};
|
|
312
|
+
screenfullJs: {
|
|
313
|
+
type: PropType<string>;
|
|
314
|
+
default: string;
|
|
315
|
+
};
|
|
316
|
+
previewTheme: {
|
|
317
|
+
type: PropType<PreviewThemes>;
|
|
318
|
+
default: string;
|
|
319
|
+
};
|
|
320
|
+
markedHeading: {
|
|
321
|
+
type: PropType<MarkedHeading>;
|
|
322
|
+
default: (text: string, level: number, raw: string) => string;
|
|
323
|
+
};
|
|
324
|
+
style: {
|
|
325
|
+
type: PropType<string | CSSProperties>;
|
|
326
|
+
default: () => {};
|
|
327
|
+
};
|
|
328
|
+
markedHeadingId: {
|
|
329
|
+
type: PropType<MarkedHeadingId>;
|
|
330
|
+
default: MarkedHeadingId;
|
|
331
|
+
};
|
|
332
|
+
tableShape: {
|
|
333
|
+
type: PropType<number[]>;
|
|
334
|
+
default: () => number[];
|
|
335
|
+
};
|
|
336
|
+
mermaid: {
|
|
337
|
+
type: ObjectConstructor;
|
|
338
|
+
};
|
|
339
|
+
mermaidJs: {
|
|
340
|
+
type: PropType<string>;
|
|
341
|
+
default: string;
|
|
342
|
+
};
|
|
343
|
+
noMermaid: {
|
|
344
|
+
type: PropType<boolean>;
|
|
345
|
+
default: boolean;
|
|
346
|
+
};
|
|
347
|
+
sanitize: {
|
|
348
|
+
type: PropType<(html: string) => string>;
|
|
349
|
+
default: (html: string) => string;
|
|
350
|
+
};
|
|
351
|
+
placeholder: {
|
|
352
|
+
type: PropType<string>;
|
|
353
|
+
default: string;
|
|
354
|
+
};
|
|
355
|
+
katex: {
|
|
356
|
+
type: ObjectConstructor;
|
|
357
|
+
};
|
|
358
|
+
katexJs: {
|
|
359
|
+
type: PropType<string>;
|
|
360
|
+
default: string;
|
|
361
|
+
};
|
|
362
|
+
katexCss: {
|
|
363
|
+
type: PropType<string>;
|
|
364
|
+
default: string;
|
|
365
|
+
};
|
|
366
|
+
noKatex: {
|
|
367
|
+
type: PropType<boolean>;
|
|
368
|
+
default: boolean;
|
|
369
|
+
};
|
|
370
|
+
defToolbars: {
|
|
371
|
+
type: PropType<string | JSX.Element>;
|
|
372
|
+
};
|
|
373
|
+
extensions: {
|
|
374
|
+
type: PropType<any[]>;
|
|
375
|
+
};
|
|
376
|
+
}>>, {
|
|
366
377
|
editorId: string;
|
|
367
378
|
prettier: boolean;
|
|
368
379
|
preview: boolean;
|
|
@@ -385,8 +396,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
385
396
|
languageUserDefined: {
|
|
386
397
|
[key: string]: StaticTextDefaultValue;
|
|
387
398
|
};
|
|
388
|
-
toolbars:
|
|
389
|
-
toolbarsExclude:
|
|
399
|
+
toolbars: ToolbarNames[];
|
|
400
|
+
toolbarsExclude: ToolbarNames[];
|
|
390
401
|
prettierCDN: string;
|
|
391
402
|
prettierMDCDN: string;
|
|
392
403
|
cropperCss: string;
|
|
@@ -401,5 +412,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
401
412
|
noMermaid: boolean;
|
|
402
413
|
sanitize: (html: string) => string;
|
|
403
414
|
placeholder: string;
|
|
415
|
+
katexJs: string;
|
|
416
|
+
katexCss: string;
|
|
417
|
+
noKatex: boolean;
|
|
404
418
|
}>;
|
|
405
419
|
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
title: {
|
|
4
|
+
type: PropType<string>;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
trigger: {
|
|
8
|
+
type: PropType<string | JSX.Element>;
|
|
9
|
+
};
|
|
10
|
+
onClick: {
|
|
11
|
+
type: PropType<(e: MouseEvent) => void>;
|
|
12
|
+
default: () => () => void;
|
|
13
|
+
};
|
|
14
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
title: {
|
|
16
|
+
type: PropType<string>;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
trigger: {
|
|
20
|
+
type: PropType<string | JSX.Element>;
|
|
21
|
+
};
|
|
22
|
+
onClick: {
|
|
23
|
+
type: PropType<(e: MouseEvent) => void>;
|
|
24
|
+
default: () => () => void;
|
|
25
|
+
};
|
|
26
|
+
}>>, {
|
|
27
|
+
title: string;
|
|
28
|
+
onClick: (e: MouseEvent) => void;
|
|
29
|
+
}>;
|
|
30
|
+
export default _default;
|