md-editor-v3 6.3.1 → 6.3.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.
Files changed (126) hide show
  1. package/README.md +27 -3
  2. package/lib/cjs/chunks/config.cjs +1 -1
  3. package/lib/es/chunks/config.mjs +30 -30
  4. package/lib/types/index.d.ts +3295 -8
  5. package/package.json +2 -2
  6. package/lib/types/DropdownToolbar/DropdownToolbar.d.ts +0 -137
  7. package/lib/types/DropdownToolbar/index.d.ts +0 -6
  8. package/lib/types/MdCatalog/CatalogLink.d.ts +0 -53
  9. package/lib/types/MdCatalog/MdCatalog.d.ts +0 -186
  10. package/lib/types/MdCatalog/index.d.ts +0 -6
  11. package/lib/types/MdEditor/Editor.d.ts +0 -590
  12. package/lib/types/MdEditor/components/Checkbox/index.d.ts +0 -33
  13. package/lib/types/MdEditor/components/CustomScrollbar/index.d.ts +0 -72
  14. package/lib/types/MdEditor/components/Divider/index.d.ts +0 -2
  15. package/lib/types/MdEditor/components/Dropdown/index.d.ts +0 -55
  16. package/lib/types/MdEditor/components/Icon/Github.d.ts +0 -2
  17. package/lib/types/MdEditor/components/Icon/Icon.d.ts +0 -18
  18. package/lib/types/MdEditor/components/Icon/Str.d.ts +0 -3
  19. package/lib/types/MdEditor/components/Icon/index.d.ts +0 -16
  20. package/lib/types/MdEditor/components/Modal/Modal.d.ts +0 -108
  21. package/lib/types/MdEditor/components/Modal/index.d.ts +0 -6
  22. package/lib/types/MdEditor/composition.d.ts +0 -92
  23. package/lib/types/MdEditor/config.d.ts +0 -33
  24. package/lib/types/MdEditor/index.d.ts +0 -6
  25. package/lib/types/MdEditor/layouts/Content/ContentPreview.d.ts +0 -153
  26. package/lib/types/MdEditor/layouts/Content/UpdateOnDemand.d.ts +0 -28
  27. package/lib/types/MdEditor/layouts/Content/codemirror/autocompletion.d.ts +0 -2
  28. package/lib/types/MdEditor/layouts/Content/codemirror/commands.d.ts +0 -4
  29. package/lib/types/MdEditor/layouts/Content/codemirror/floatingToolbar.d.ts +0 -6
  30. package/lib/types/MdEditor/layouts/Content/codemirror/index.d.ts +0 -53
  31. package/lib/types/MdEditor/layouts/Content/codemirror/textShortener.d.ts +0 -20
  32. package/lib/types/MdEditor/layouts/Content/codemirror/themeLight.d.ts +0 -26
  33. package/lib/types/MdEditor/layouts/Content/codemirror/themeOneDark.d.ts +0 -26
  34. package/lib/types/MdEditor/layouts/Content/composition/index.d.ts +0 -10
  35. package/lib/types/MdEditor/layouts/Content/composition/useAttach.d.ts +0 -9
  36. package/lib/types/MdEditor/layouts/Content/composition/useAutoScroll.d.ts +0 -5
  37. package/lib/types/MdEditor/layouts/Content/composition/useCodeMirror.d.ts +0 -15
  38. package/lib/types/MdEditor/layouts/Content/composition/useCopyCode.d.ts +0 -4
  39. package/lib/types/MdEditor/layouts/Content/composition/useEcharts.d.ts +0 -10
  40. package/lib/types/MdEditor/layouts/Content/composition/useFollowCatalog.d.ts +0 -5
  41. package/lib/types/MdEditor/layouts/Content/composition/useHighlight.d.ts +0 -8
  42. package/lib/types/MdEditor/layouts/Content/composition/useKatex.d.ts +0 -8
  43. package/lib/types/MdEditor/layouts/Content/composition/useMarkdownIt.d.ts +0 -6
  44. package/lib/types/MdEditor/layouts/Content/composition/useMermaid.d.ts +0 -10
  45. package/lib/types/MdEditor/layouts/Content/composition/usePasteUpload.d.ts +0 -8
  46. package/lib/types/MdEditor/layouts/Content/composition/useRemount.d.ts +0 -3
  47. package/lib/types/MdEditor/layouts/Content/composition/useResize.d.ts +0 -12
  48. package/lib/types/MdEditor/layouts/Content/composition/useTaskState.d.ts +0 -3
  49. package/lib/types/MdEditor/layouts/Content/composition/useToolbarEffect.d.ts +0 -3
  50. package/lib/types/MdEditor/layouts/Content/composition/userZoom.d.ts +0 -10
  51. package/lib/types/MdEditor/layouts/Content/index.d.ts +0 -93
  52. package/lib/types/MdEditor/layouts/Content/markdownIt/admonition/index.d.ts +0 -11
  53. package/lib/types/MdEditor/layouts/Content/markdownIt/code/index.d.ts +0 -23
  54. package/lib/types/MdEditor/layouts/Content/markdownIt/echarts/index.d.ts +0 -7
  55. package/lib/types/MdEditor/layouts/Content/markdownIt/heading/index.d.ts +0 -9
  56. package/lib/types/MdEditor/layouts/Content/markdownIt/katex/index.d.ts +0 -20
  57. package/lib/types/MdEditor/layouts/Content/markdownIt/mermaid/index.d.ts +0 -7
  58. package/lib/types/MdEditor/layouts/Content/markdownIt/task/index.d.ts +0 -15
  59. package/lib/types/MdEditor/layouts/Content/markdownIt/xss/index.d.ts +0 -13
  60. package/lib/types/MdEditor/layouts/Content/props.d.ts +0 -204
  61. package/lib/types/MdEditor/layouts/Content/type.d.ts +0 -19
  62. package/lib/types/MdEditor/layouts/FloatingToolbar/index.d.ts +0 -2
  63. package/lib/types/MdEditor/layouts/Footer/MarkdownTotal.d.ts +0 -15
  64. package/lib/types/MdEditor/layouts/Footer/ScrollAuto.d.ts +0 -21
  65. package/lib/types/MdEditor/layouts/Footer/index.d.ts +0 -52
  66. package/lib/types/MdEditor/layouts/Modals/Clip.d.ts +0 -33
  67. package/lib/types/MdEditor/layouts/Modals/index.d.ts +0 -33
  68. package/lib/types/MdEditor/layouts/Toolbar/TableShape.d.ts +0 -28
  69. package/lib/types/MdEditor/layouts/Toolbar/composition.d.ts +0 -7
  70. package/lib/types/MdEditor/layouts/Toolbar/index.d.ts +0 -23
  71. package/lib/types/MdEditor/layouts/Toolbar/props.d.ts +0 -14
  72. package/lib/types/MdEditor/layouts/Toolbar/tools/Bold.d.ts +0 -2
  73. package/lib/types/MdEditor/layouts/Toolbar/tools/Catalog.d.ts +0 -2
  74. package/lib/types/MdEditor/layouts/Toolbar/tools/Code.d.ts +0 -2
  75. package/lib/types/MdEditor/layouts/Toolbar/tools/CodeRow.d.ts +0 -2
  76. package/lib/types/MdEditor/layouts/Toolbar/tools/Fullscreen.d.ts +0 -2
  77. package/lib/types/MdEditor/layouts/Toolbar/tools/Github.d.ts +0 -2
  78. package/lib/types/MdEditor/layouts/Toolbar/tools/HtmlPreview.d.ts +0 -2
  79. package/lib/types/MdEditor/layouts/Toolbar/tools/Image.d.ts +0 -2
  80. package/lib/types/MdEditor/layouts/Toolbar/tools/ImageDropdown.d.ts +0 -2
  81. package/lib/types/MdEditor/layouts/Toolbar/tools/Italic.d.ts +0 -2
  82. package/lib/types/MdEditor/layouts/Toolbar/tools/Katex.d.ts +0 -2
  83. package/lib/types/MdEditor/layouts/Toolbar/tools/Link.d.ts +0 -2
  84. package/lib/types/MdEditor/layouts/Toolbar/tools/Mermaid.d.ts +0 -2
  85. package/lib/types/MdEditor/layouts/Toolbar/tools/Next.d.ts +0 -2
  86. package/lib/types/MdEditor/layouts/Toolbar/tools/OrderedList.d.ts +0 -2
  87. package/lib/types/MdEditor/layouts/Toolbar/tools/PageFullscreen.d.ts +0 -2
  88. package/lib/types/MdEditor/layouts/Toolbar/tools/Prettier.d.ts +0 -2
  89. package/lib/types/MdEditor/layouts/Toolbar/tools/Preview.d.ts +0 -2
  90. package/lib/types/MdEditor/layouts/Toolbar/tools/PreviewOnly.d.ts +0 -2
  91. package/lib/types/MdEditor/layouts/Toolbar/tools/Quote.d.ts +0 -2
  92. package/lib/types/MdEditor/layouts/Toolbar/tools/Revoke.d.ts +0 -2
  93. package/lib/types/MdEditor/layouts/Toolbar/tools/Save.d.ts +0 -2
  94. package/lib/types/MdEditor/layouts/Toolbar/tools/StrikeThrough.d.ts +0 -2
  95. package/lib/types/MdEditor/layouts/Toolbar/tools/Sub.d.ts +0 -2
  96. package/lib/types/MdEditor/layouts/Toolbar/tools/Sup.d.ts +0 -2
  97. package/lib/types/MdEditor/layouts/Toolbar/tools/Table.d.ts +0 -2
  98. package/lib/types/MdEditor/layouts/Toolbar/tools/Task.d.ts +0 -2
  99. package/lib/types/MdEditor/layouts/Toolbar/tools/Title.d.ts +0 -2
  100. package/lib/types/MdEditor/layouts/Toolbar/tools/Underline.d.ts +0 -2
  101. package/lib/types/MdEditor/layouts/Toolbar/tools/UnorderedList.d.ts +0 -2
  102. package/lib/types/MdEditor/props.d.ts +0 -784
  103. package/lib/types/MdEditor/static/env.d.ts +0 -1
  104. package/lib/types/MdEditor/static/event-name.d.ts +0 -23
  105. package/lib/types/MdEditor/static/index.d.ts +0 -14
  106. package/lib/types/MdEditor/type.d.ts +0 -534
  107. package/lib/types/MdEditor/utils/cache.d.ts +0 -2
  108. package/lib/types/MdEditor/utils/content-help.d.ts +0 -44
  109. package/lib/types/MdEditor/utils/dom.d.ts +0 -43
  110. package/lib/types/MdEditor/utils/event-bus.d.ts +0 -17
  111. package/lib/types/MdEditor/utils/index.d.ts +0 -38
  112. package/lib/types/MdEditor/utils/md-it.d.ts +0 -2
  113. package/lib/types/MdEditor/utils/scroll-auto.d.ts +0 -19
  114. package/lib/types/MdEditor/utils/vue-tsx.d.ts +0 -18
  115. package/lib/types/MdPreview/MdPreview.d.ts +0 -516
  116. package/lib/types/MdPreview/composition/useExpose.d.ts +0 -5
  117. package/lib/types/MdPreview/index.d.ts +0 -6
  118. package/lib/types/ModalToolbar/ModalToolbar.d.ts +0 -216
  119. package/lib/types/ModalToolbar/index.d.ts +0 -6
  120. package/lib/types/NormalFooterToolbar/NormalFooterToolbar.d.ts +0 -51
  121. package/lib/types/NormalFooterToolbar/index.d.ts +0 -6
  122. package/lib/types/NormalToolbar/NormalToolbar.d.ts +0 -117
  123. package/lib/types/NormalToolbar/index.d.ts +0 -6
  124. package/lib/types/config.d.ts +0 -3
  125. package/lib/types/preview.d.ts +0 -6
  126. package/lib/types/util.d.ts +0 -5
@@ -1,8 +1,3295 @@
1
- export { default as MdEditor } from './MdEditor';
2
- export { default as NormalToolbar } from './NormalToolbar';
3
- export { default as DropdownToolbar } from './DropdownToolbar';
4
- export { default as ModalToolbar } from './ModalToolbar';
5
- export { default as MdModal } from './MdEditor/components/Modal';
6
- export { default as StrIcon } from './MdEditor/components/Icon/Str';
7
- export { default as NormalFooterToolbar } from './NormalFooterToolbar';
8
- export * from './preview';
1
+ import * as vue from 'vue';
2
+ import { PropType, VNode, CSSProperties, Component, ExtractPropTypes, SetupContext, App } from 'vue';
3
+ import * as vue_jsx_runtime from 'vue/jsx-runtime';
4
+ import * as _codemirror_autocomplete from '@codemirror/autocomplete';
5
+ import { CompletionSource } from '@codemirror/autocomplete';
6
+ import { Extension, Compartment } from '@codemirror/state';
7
+ import { KeyBinding, EditorView } from '@codemirror/view';
8
+ import { LooseRequired } from '@vue/shared';
9
+ import markdownit, { Token } from 'markdown-it';
10
+ import * as xss from 'xss';
11
+
12
+ type IconName = 'bold' | 'underline' | 'italic' | 'strike-through' | 'title' | 'sub' | 'sup' | 'quote' | 'unordered-list' | 'ordered-list' | 'task' | 'code-row' | 'code' | 'link' | 'image' | 'table' | 'revoke' | 'next' | 'save' | 'prettier' | 'minimize' | 'maximize' | 'fullscreen-exit' | 'fullscreen' | 'preview-only' | 'preview' | 'preview-html' | 'catalog' | 'github' | 'mermaid' | 'formula' | 'close' | 'delete' | 'upload';
13
+
14
+ declare const mdPreviewProps: {
15
+ /**
16
+ * markdown content.
17
+ *
18
+ * @default ''
19
+ */
20
+ modelValue: {
21
+ type: PropType<string>;
22
+ default: string;
23
+ };
24
+ /**
25
+ * input回调事件
26
+ */
27
+ onChange: {
28
+ type: PropType<ChangeEvent>;
29
+ default: undefined;
30
+ };
31
+ /**
32
+ * 主题,支持light和dark
33
+ *
34
+ * @default 'light'
35
+ */
36
+ theme: {
37
+ type: PropType<Themes>;
38
+ default: string;
39
+ };
40
+ /**
41
+ * 外层类名
42
+ *
43
+ * @default ''
44
+ */
45
+ class: {
46
+ type: StringConstructor;
47
+ default: string;
48
+ };
49
+ /**
50
+ * 预设语言名称
51
+ *
52
+ * @default 'zh-CN'
53
+ */
54
+ language: {
55
+ type: PropType<string>;
56
+ default: string;
57
+ };
58
+ /**
59
+ * html变化事件
60
+ */
61
+ onHtmlChanged: {
62
+ type: PropType<HtmlChangedEvent>;
63
+ default: undefined;
64
+ };
65
+ /**
66
+ * 获取目录结构
67
+ */
68
+ onGetCatalog: {
69
+ type: PropType<GetCatalogEvent>;
70
+ default: undefined;
71
+ };
72
+ /**
73
+ * 编辑器唯一标识
74
+ *
75
+ * @default 'md-editor-v3'
76
+ * @deprecated 5.x版本开始使用 id 替换
77
+ */
78
+ editorId: {
79
+ type: PropType<string>;
80
+ default: undefined;
81
+ };
82
+ /**
83
+ * 5.x版本开始 editorId 的替换
84
+ *
85
+ * @default 'md-editor-v3'
86
+ */
87
+ id: {
88
+ type: PropType<string>;
89
+ default: undefined;
90
+ };
91
+ /**
92
+ * 预览中代码是否显示行号
93
+ *
94
+ * @default true
95
+ */
96
+ showCodeRowNumber: {
97
+ type: PropType<boolean>;
98
+ default: boolean;
99
+ };
100
+ /**
101
+ * 预览内容样式
102
+ *
103
+ * @default 'default'
104
+ */
105
+ previewTheme: {
106
+ type: PropType<PreviewThemes>;
107
+ default: string;
108
+ };
109
+ /**
110
+ * 编辑器样式
111
+ */
112
+ style: {
113
+ type: PropType<CSSProperties | string>;
114
+ default: () => {};
115
+ };
116
+ /**
117
+ * 标题的id生成方式
118
+ *
119
+ * @default (text: string) => text
120
+ */
121
+ mdHeadingId: {
122
+ type: PropType<MdHeadingId>;
123
+ default: MdHeadingId;
124
+ };
125
+ /**
126
+ *
127
+ * 不能保证文本正确的情况,在marked编译md文本后通过该方法处理
128
+ * 推荐DOMPurify、sanitize-html
129
+ *
130
+ * @default (text: string) => text
131
+ */
132
+ sanitize: {
133
+ type: PropType<(html: string) => string>;
134
+ default: (html: string) => string;
135
+ };
136
+ /**
137
+ * 不使用该mermaid
138
+ *
139
+ * @default false
140
+ */
141
+ noMermaid: {
142
+ type: PropType<boolean>;
143
+ default: boolean;
144
+ };
145
+ /**
146
+ * 不使用katex
147
+ *
148
+ * @default false
149
+ */
150
+ noKatex: {
151
+ type: PropType<boolean>;
152
+ default: boolean;
153
+ };
154
+ /**
155
+ * 代码主题
156
+ *
157
+ * @default 'atom'
158
+ */
159
+ codeTheme: {
160
+ type: PropType<string>;
161
+ default: string;
162
+ };
163
+ /**
164
+ * 复制代码格式化方法
165
+ *
166
+ * @default (text) => text
167
+ */
168
+ formatCopiedText: {
169
+ type: PropType<(text: string) => string>;
170
+ default: (text: string) => string;
171
+ };
172
+ /**
173
+ * 某些预览主题的代码模块背景是暗色系
174
+ * 将这个属性设置为true,会自动在该主题下的light模式下使用暗色系的代码风格
175
+ *
176
+ * @default true
177
+ */
178
+ codeStyleReverse: {
179
+ type: PropType<boolean>;
180
+ default: boolean;
181
+ };
182
+ /**
183
+ * 需要自动调整的预览主题
184
+ *
185
+ * @default ['default', 'mk-cute']
186
+ */
187
+ codeStyleReverseList: {
188
+ type: PropType<Array<string>>;
189
+ default: string[];
190
+ };
191
+ noHighlight: {
192
+ type: PropType<boolean>;
193
+ default: boolean;
194
+ };
195
+ /**
196
+ * 是否关闭编辑器默认的放大缩小功能
197
+ */
198
+ noImgZoomIn: {
199
+ type: PropType<boolean>;
200
+ default: boolean;
201
+ };
202
+ /**
203
+ * 自定义的图标
204
+ */
205
+ customIcon: {
206
+ type: PropType<CustomIcon>;
207
+ default: {};
208
+ };
209
+ sanitizeMermaid: {
210
+ type: PropType<(h: string) => Promise<string>>;
211
+ default: (h: string) => Promise<string>;
212
+ };
213
+ /**
214
+ * 是否开启折叠代码功能
215
+ * 不开启会使用div标签替代details标签
216
+ *
217
+ * @default true
218
+ */
219
+ codeFoldable: {
220
+ type: PropType<boolean>;
221
+ default: boolean;
222
+ };
223
+ /**
224
+ * 触发自动折叠代码的行数阈值
225
+ *
226
+ * @default 30
227
+ */
228
+ autoFoldThreshold: {
229
+ type: PropType<number>;
230
+ default: number;
231
+ };
232
+ /**
233
+ * 内容重新挂载事件
234
+ *
235
+ * 相比起onHtmlChanged,onRemount会在重新挂载后触发
236
+ */
237
+ onRemount: {
238
+ type: PropType<() => void>;
239
+ default: undefined;
240
+ };
241
+ /**
242
+ * 不使用 echarts
243
+ */
244
+ noEcharts: {
245
+ type: PropType<boolean>;
246
+ default: boolean;
247
+ };
248
+ previewComponent: {
249
+ type: PropType<Component>;
250
+ default: undefined;
251
+ };
252
+ };
253
+ declare const editorProps: {
254
+ /**
255
+ * input回调事件
256
+ */
257
+ onSave: {
258
+ type: PropType<SaveEvent>;
259
+ default: undefined;
260
+ };
261
+ /**
262
+ * 上传图片事件
263
+ */
264
+ onUploadImg: {
265
+ type: PropType<UploadImgEvent>;
266
+ default: undefined;
267
+ };
268
+ /**
269
+ * 是否页面内全屏
270
+ *
271
+ * @default false
272
+ */
273
+ pageFullscreen: {
274
+ type: PropType<boolean>;
275
+ default: boolean;
276
+ };
277
+ /**
278
+ * 是否展开预览
279
+ *
280
+ * @default true
281
+ */
282
+ preview: {
283
+ type: PropType<boolean>;
284
+ default: boolean;
285
+ };
286
+ /**
287
+ * 是否展开html预览
288
+ *
289
+ * @default false
290
+ */
291
+ htmlPreview: {
292
+ type: PropType<boolean>;
293
+ default: boolean;
294
+ };
295
+ /**
296
+ * 仅预览模式,不显示toolbar和编辑框
297
+ *
298
+ * @4.0.0开始移除该设置,使用组件MdPreview替换
299
+ *
300
+ * @default false
301
+ */
302
+ /**
303
+ * 工具栏选择显示
304
+ *
305
+ * @default allToolbar
306
+ */
307
+ toolbars: {
308
+ type: PropType<Array<ToolbarNames>>;
309
+ default: string[];
310
+ };
311
+ /**
312
+ * 浮动工具栏
313
+ *
314
+ * @version 6.0.0
315
+ * @default []
316
+ */
317
+ floatingToolbars: {
318
+ type: PropType<Array<ToolbarNames>>;
319
+ default: never[];
320
+ };
321
+ /**
322
+ * 工具栏选择不显示
323
+ *
324
+ * @default []
325
+ */
326
+ toolbarsExclude: {
327
+ type: PropType<Array<ToolbarNames>>;
328
+ default: never[];
329
+ };
330
+ /**
331
+ * 格式化md
332
+ *
333
+ * @default true
334
+ */
335
+ noPrettier: {
336
+ type: PropType<boolean>;
337
+ default: boolean;
338
+ };
339
+ /**
340
+ * 一个tab等于空格数
341
+ *
342
+ * @default 2
343
+ */
344
+ tabWidth: {
345
+ type: PropType<number>;
346
+ default: number;
347
+ };
348
+ /**
349
+ * 表格预设格子数
350
+ *
351
+ * 也可以是[6, 4, 10, 8]
352
+ *
353
+ * @default [6, 4]
354
+ */
355
+ tableShape: {
356
+ type: PropType<Array<number>>;
357
+ default: number[];
358
+ };
359
+ /**
360
+ * 空提示
361
+ *
362
+ * @default ''
363
+ */
364
+ placeholder: {
365
+ type: PropType<string>;
366
+ default: string;
367
+ };
368
+ /**
369
+ * 自定义的工具栏列表
370
+ */
371
+ defToolbars: {
372
+ type: PropType<string | VNode>;
373
+ default: undefined;
374
+ };
375
+ /**
376
+ * 内部错误捕获
377
+ */
378
+ onError: {
379
+ type: PropType<ErrorEvent>;
380
+ default: undefined;
381
+ };
382
+ /**
383
+ * 页脚列表显示顺序
384
+ */
385
+ footers: {
386
+ type: PropType<Array<Footers>>;
387
+ default: Footers[];
388
+ };
389
+ /**
390
+ * 是否默认激活输入框和预览框同步滚动
391
+ *
392
+ * @default true
393
+ */
394
+ scrollAuto: {
395
+ type: PropType<boolean>;
396
+ default: boolean;
397
+ };
398
+ /**
399
+ * 自定义的也叫工具组件列表
400
+ */
401
+ defFooters: {
402
+ type: PropType<string | VNode>;
403
+ default: undefined;
404
+ };
405
+ /**
406
+ * 是否禁用上传图片
407
+ *
408
+ * @default false
409
+ */
410
+ noUploadImg: {
411
+ type: PropType<boolean>;
412
+ default: boolean;
413
+ };
414
+ /**
415
+ * 文本区域自动获得焦点
416
+ *
417
+ * @default false
418
+ */
419
+ autoFocus: {
420
+ type: PropType<boolean>;
421
+ default: boolean;
422
+ };
423
+ /**
424
+ * 禁用文本区域
425
+ *
426
+ * @default false
427
+ */
428
+ disabled: {
429
+ type: PropType<boolean>;
430
+ default: boolean;
431
+ };
432
+ /**
433
+ * 文本区域为只读
434
+ *
435
+ * @default false
436
+ */
437
+ readOnly: {
438
+ type: PropType<boolean>;
439
+ default: boolean;
440
+ };
441
+ /**
442
+ * 文本区域允许的最大字符数
443
+ */
444
+ maxLength: {
445
+ type: PropType<number>;
446
+ default: undefined;
447
+ };
448
+ /**
449
+ * 是否启用自动识别粘贴代码类别
450
+ * 目前支持 vscode 复制的代码识别
451
+ *
452
+ * @default false
453
+ */
454
+ autoDetectCode: {
455
+ type: PropType<boolean>;
456
+ default: boolean;
457
+ };
458
+ /**
459
+ * 输入框失去焦点时触发事件
460
+ */
461
+ onBlur: {
462
+ type: PropType<(event: FocusEvent) => void>;
463
+ default: undefined;
464
+ };
465
+ /**
466
+ * 输入框获得焦点时触发事件
467
+ */
468
+ onFocus: {
469
+ type: PropType<(event: FocusEvent) => void>;
470
+ default: undefined;
471
+ };
472
+ /**
473
+ * @codemirror/autocomplete匹配关键词的方法列表
474
+ *
475
+ * 它会被像下面这样嵌入编辑器
476
+ *
477
+ * import { autocompletion } from '@codemirror/autocomplete';
478
+ * autocompletion({
479
+ * override: [...completions]
480
+ * })
481
+ */
482
+ completions: {
483
+ type: PropType<Array<CompletionSource>>;
484
+ default: undefined;
485
+ };
486
+ /**
487
+ * 是否在工具栏下面显示对应的文字名称
488
+ *
489
+ * @default false
490
+ */
491
+ showToolbarName: {
492
+ type: PropType<boolean>;
493
+ default: boolean;
494
+ };
495
+ /**
496
+ * 字符输入事件
497
+ */
498
+ onInput: {
499
+ type: PropType<(event: Event) => void>;
500
+ default: undefined;
501
+ };
502
+ onDrop: {
503
+ type: PropType<(event: DragEvent) => void>;
504
+ default: undefined;
505
+ };
506
+ /**
507
+ * 输入框的默认宽度
508
+ *
509
+ * @example '100px'/'50%'
510
+ * @default '50%
511
+ */
512
+ inputBoxWidth: {
513
+ type: PropType<string>;
514
+ default: string;
515
+ };
516
+ /**
517
+ * 输入框宽度变化事件
518
+ */
519
+ oninputBoxWidthChange: {
520
+ type: PropType<(width: string) => void>;
521
+ default: undefined;
522
+ };
523
+ /**
524
+ * 替换粘贴的图片链接
525
+ *
526
+ * @param t 图片链接
527
+ * @returns
528
+ */
529
+ transformImgUrl: {
530
+ type: PropType<(t: string) => string | Promise<string>>;
531
+ default: (t: string) => string;
532
+ };
533
+ /**
534
+ * 内置的目录显示的状态
535
+ *
536
+ * 'fixed': 悬浮在内容上方
537
+ * 'flat': 展示在右侧
538
+ *
539
+ * \>=5.3.0
540
+ *
541
+ * @default 'fixed'
542
+ */
543
+ catalogLayout: {
544
+ type: PropType<"fixed" | "flat">;
545
+ default: string;
546
+ };
547
+ /**
548
+ * 控制最大显示的目录层级
549
+ */
550
+ catalogMaxDepth: {
551
+ type: PropType<number>;
552
+ default: undefined;
553
+ };
554
+ /**
555
+ * markdown content.
556
+ *
557
+ * @default ''
558
+ */
559
+ modelValue: {
560
+ type: PropType<string>;
561
+ default: string;
562
+ };
563
+ /**
564
+ * input回调事件
565
+ */
566
+ onChange: {
567
+ type: PropType<ChangeEvent>;
568
+ default: undefined;
569
+ };
570
+ /**
571
+ * 主题,支持light和dark
572
+ *
573
+ * @default 'light'
574
+ */
575
+ theme: {
576
+ type: PropType<Themes>;
577
+ default: string;
578
+ };
579
+ /**
580
+ * 外层类名
581
+ *
582
+ * @default ''
583
+ */
584
+ class: {
585
+ type: StringConstructor;
586
+ default: string;
587
+ };
588
+ /**
589
+ * 预设语言名称
590
+ *
591
+ * @default 'zh-CN'
592
+ */
593
+ language: {
594
+ type: PropType<string>;
595
+ default: string;
596
+ };
597
+ /**
598
+ * html变化事件
599
+ */
600
+ onHtmlChanged: {
601
+ type: PropType<HtmlChangedEvent>;
602
+ default: undefined;
603
+ };
604
+ /**
605
+ * 获取目录结构
606
+ */
607
+ onGetCatalog: {
608
+ type: PropType<GetCatalogEvent>;
609
+ default: undefined;
610
+ };
611
+ /**
612
+ * 编辑器唯一标识
613
+ *
614
+ * @default 'md-editor-v3'
615
+ * @deprecated 5.x版本开始使用 id 替换
616
+ */
617
+ editorId: {
618
+ type: PropType<string>;
619
+ default: undefined;
620
+ };
621
+ /**
622
+ * 5.x版本开始 editorId 的替换
623
+ *
624
+ * @default 'md-editor-v3'
625
+ */
626
+ id: {
627
+ type: PropType<string>;
628
+ default: undefined;
629
+ };
630
+ /**
631
+ * 预览中代码是否显示行号
632
+ *
633
+ * @default true
634
+ */
635
+ showCodeRowNumber: {
636
+ type: PropType<boolean>;
637
+ default: boolean;
638
+ };
639
+ /**
640
+ * 预览内容样式
641
+ *
642
+ * @default 'default'
643
+ */
644
+ previewTheme: {
645
+ type: PropType<PreviewThemes>;
646
+ default: string;
647
+ };
648
+ /**
649
+ * 编辑器样式
650
+ */
651
+ style: {
652
+ type: PropType<CSSProperties | string>;
653
+ default: () => {};
654
+ };
655
+ /**
656
+ * 标题的id生成方式
657
+ *
658
+ * @default (text: string) => text
659
+ */
660
+ mdHeadingId: {
661
+ type: PropType<MdHeadingId>;
662
+ default: MdHeadingId;
663
+ };
664
+ /**
665
+ *
666
+ * 不能保证文本正确的情况,在marked编译md文本后通过该方法处理
667
+ * 推荐DOMPurify、sanitize-html
668
+ *
669
+ * @default (text: string) => text
670
+ */
671
+ sanitize: {
672
+ type: PropType<(html: string) => string>;
673
+ default: (html: string) => string;
674
+ };
675
+ /**
676
+ * 不使用该mermaid
677
+ *
678
+ * @default false
679
+ */
680
+ noMermaid: {
681
+ type: PropType<boolean>;
682
+ default: boolean;
683
+ };
684
+ /**
685
+ * 不使用katex
686
+ *
687
+ * @default false
688
+ */
689
+ noKatex: {
690
+ type: PropType<boolean>;
691
+ default: boolean;
692
+ };
693
+ /**
694
+ * 代码主题
695
+ *
696
+ * @default 'atom'
697
+ */
698
+ codeTheme: {
699
+ type: PropType<string>;
700
+ default: string;
701
+ };
702
+ /**
703
+ * 复制代码格式化方法
704
+ *
705
+ * @default (text) => text
706
+ */
707
+ formatCopiedText: {
708
+ type: PropType<(text: string) => string>;
709
+ default: (text: string) => string;
710
+ };
711
+ /**
712
+ * 某些预览主题的代码模块背景是暗色系
713
+ * 将这个属性设置为true,会自动在该主题下的light模式下使用暗色系的代码风格
714
+ *
715
+ * @default true
716
+ */
717
+ codeStyleReverse: {
718
+ type: PropType<boolean>;
719
+ default: boolean;
720
+ };
721
+ /**
722
+ * 需要自动调整的预览主题
723
+ *
724
+ * @default ['default', 'mk-cute']
725
+ */
726
+ codeStyleReverseList: {
727
+ type: PropType<Array<string>>;
728
+ default: string[];
729
+ };
730
+ noHighlight: {
731
+ type: PropType<boolean>;
732
+ default: boolean;
733
+ };
734
+ /**
735
+ * 是否关闭编辑器默认的放大缩小功能
736
+ */
737
+ noImgZoomIn: {
738
+ type: PropType<boolean>;
739
+ default: boolean;
740
+ };
741
+ /**
742
+ * 自定义的图标
743
+ */
744
+ customIcon: {
745
+ type: PropType<CustomIcon>;
746
+ default: {};
747
+ };
748
+ sanitizeMermaid: {
749
+ type: PropType<(h: string) => Promise<string>>;
750
+ default: (h: string) => Promise<string>;
751
+ };
752
+ /**
753
+ * 是否开启折叠代码功能
754
+ * 不开启会使用div标签替代details标签
755
+ *
756
+ * @default true
757
+ */
758
+ codeFoldable: {
759
+ type: PropType<boolean>;
760
+ default: boolean;
761
+ };
762
+ /**
763
+ * 触发自动折叠代码的行数阈值
764
+ *
765
+ * @default 30
766
+ */
767
+ autoFoldThreshold: {
768
+ type: PropType<number>;
769
+ default: number;
770
+ };
771
+ /**
772
+ * 内容重新挂载事件
773
+ *
774
+ * 相比起onHtmlChanged,onRemount会在重新挂载后触发
775
+ */
776
+ onRemount: {
777
+ type: PropType<() => void>;
778
+ default: undefined;
779
+ };
780
+ /**
781
+ * 不使用 echarts
782
+ */
783
+ noEcharts: {
784
+ type: PropType<boolean>;
785
+ default: boolean;
786
+ };
787
+ previewComponent: {
788
+ type: PropType<Component>;
789
+ default: undefined;
790
+ };
791
+ };
792
+
793
+ type ToolDirective = 'bold' | 'underline' | 'italic' | 'strikeThrough' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'quote' | 'unorderedList' | 'orderedList' | 'task' | 'codeRow' | 'code' | 'link' | 'image' | 'table' | 'sub' | 'sup' | 'prettier' | 'flow' | 'sequence' | 'gantt' | 'class' | 'state' | 'pie' | 'relationship' | 'journey' | 'katexInline' | 'katexBlock' | 'universal';
794
+
795
+ declare global {
796
+ interface Window {
797
+ hljs: any;
798
+ prettier: any;
799
+ prettierPlugins: any;
800
+ Cropper: any;
801
+ screenfull: any;
802
+ mermaid: any;
803
+ katex: any;
804
+ echarts: any;
805
+ }
806
+ }
807
+ interface ToolbarTips {
808
+ bold?: string;
809
+ underline?: string;
810
+ italic?: string;
811
+ strikeThrough?: string;
812
+ title?: string;
813
+ sub?: string;
814
+ sup?: string;
815
+ quote?: string;
816
+ unorderedList?: string;
817
+ orderedList?: string;
818
+ task?: string;
819
+ codeRow?: string;
820
+ code?: string;
821
+ link?: string;
822
+ image?: string;
823
+ table?: string;
824
+ mermaid?: string;
825
+ katex?: string;
826
+ revoke?: string;
827
+ next?: string;
828
+ save?: string;
829
+ prettier?: string;
830
+ pageFullscreen?: string;
831
+ fullscreen?: string;
832
+ preview?: string;
833
+ previewOnly?: string;
834
+ htmlPreview?: string;
835
+ catalog?: string;
836
+ github?: string;
837
+ '-'?: string;
838
+ '='?: string;
839
+ }
840
+ interface StaticTextDefaultValue {
841
+ toolbarTips?: ToolbarTips;
842
+ titleItem?: {
843
+ h1?: string;
844
+ h2?: string;
845
+ h3?: string;
846
+ h4?: string;
847
+ h5?: string;
848
+ h6?: string;
849
+ };
850
+ imgTitleItem?: {
851
+ link: string;
852
+ upload: string;
853
+ clip2upload: string;
854
+ };
855
+ linkModalTips?: {
856
+ linkTitle?: string;
857
+ imageTitle?: string;
858
+ descLabel?: string;
859
+ descLabelPlaceHolder?: string;
860
+ urlLabel?: string;
861
+ urlLabelPlaceHolder?: string;
862
+ buttonOK?: string;
863
+ };
864
+ clipModalTips?: {
865
+ title?: string;
866
+ buttonUpload?: string;
867
+ };
868
+ copyCode?: {
869
+ text?: string;
870
+ successTips?: string;
871
+ failTips?: string;
872
+ };
873
+ mermaid?: {
874
+ flow?: string;
875
+ sequence?: string;
876
+ gantt?: string;
877
+ class?: string;
878
+ state?: string;
879
+ pie?: string;
880
+ relationship?: string;
881
+ journey?: string;
882
+ };
883
+ katex?: {
884
+ inline: string;
885
+ block: string;
886
+ };
887
+ footer?: {
888
+ markdownTotal: string;
889
+ scrollAuto: string;
890
+ };
891
+ }
892
+ interface StaticTextDefault {
893
+ 'zh-CN': StaticTextDefaultValue;
894
+ 'en-US': StaticTextDefaultValue;
895
+ }
896
+ type StaticTextDefaultKey = keyof StaticTextDefault;
897
+ type ToolbarNames = keyof ToolbarTips | number;
898
+ type Footers = '=' | 'markdownTotal' | 'scrollSwitch' | number;
899
+ interface SettingType {
900
+ pageFullscreen: boolean;
901
+ fullscreen: boolean;
902
+ preview: boolean;
903
+ htmlPreview: boolean;
904
+ previewOnly: boolean;
905
+ }
906
+ type Themes = 'light' | 'dark';
907
+ /**
908
+ * 预览主题
909
+ *
910
+ * @list ['default', 'github', 'vuepress', 'mk-cute', 'smart-blue', 'cyanosis']
911
+ */
912
+ type PreviewThemes = string;
913
+ interface HeadList {
914
+ text: string;
915
+ level: 1 | 2 | 3 | 4 | 5 | 6;
916
+ active?: boolean;
917
+ line: number;
918
+ currentToken?: Token;
919
+ nextToken?: Token;
920
+ }
921
+ type MdHeadingId = (options: {
922
+ text: string;
923
+ level: number;
924
+ index: number;
925
+ currentToken?: Token;
926
+ nextToken?: Token;
927
+ }) => string;
928
+ interface MermaidTemplate {
929
+ /**
930
+ * 流程图
931
+ */
932
+ flow?: string;
933
+ /**
934
+ * 时序图
935
+ */
936
+ sequence?: string;
937
+ /**
938
+ * 甘特图
939
+ */
940
+ gantt?: string;
941
+ /**
942
+ * 类图
943
+ */
944
+ class?: string;
945
+ /**
946
+ * 状态图
947
+ */
948
+ state?: string;
949
+ /**
950
+ * 饼图
951
+ */
952
+ pie?: string;
953
+ /**
954
+ * 关系图
955
+ */
956
+ relationship?: string;
957
+ /**
958
+ * 旅程图
959
+ */
960
+ journey?: string;
961
+ }
962
+ interface MarkdownItConfigPlugin {
963
+ type: string;
964
+ plugin: markdownit.PluginWithParams;
965
+ options: any;
966
+ }
967
+ /**
968
+ * CodeMirror扩展类型
969
+ *
970
+ * ^6.0.0
971
+ */
972
+ interface CodeMirrorExtension {
973
+ /**
974
+ * 仅用来提供开发者分别不同扩展的依据
975
+ */
976
+ type: string;
977
+ /**
978
+ * CodeMirror的扩展
979
+ */
980
+ extension: Extension | ((options: any) => Extension);
981
+ /**
982
+ * 包裹扩展的Compartment,只有部分扩展有,提供扩展更新的能力
983
+ */
984
+ compartment?: Compartment;
985
+ options?: any;
986
+ }
987
+ interface GlobalConfig {
988
+ /**
989
+ * 编辑器内部依赖库
990
+ */
991
+ editorExtensions: {
992
+ highlight?: {
993
+ instance?: any;
994
+ js?: string;
995
+ css?: CodeCss;
996
+ };
997
+ prettier?: {
998
+ prettierInstance?: any;
999
+ parserMarkdownInstance?: any;
1000
+ standaloneJs?: string;
1001
+ parserMarkdownJs?: string;
1002
+ };
1003
+ cropper?: {
1004
+ instance?: any;
1005
+ js?: string;
1006
+ css?: string;
1007
+ };
1008
+ screenfull?: {
1009
+ instance?: any;
1010
+ js?: string;
1011
+ };
1012
+ mermaid?: {
1013
+ instance?: any;
1014
+ js?: string;
1015
+ /**
1016
+ * 是否启用缩放功能
1017
+ *
1018
+ * @default true
1019
+ */
1020
+ enableZoom?: boolean;
1021
+ };
1022
+ katex?: {
1023
+ instance?: any;
1024
+ js?: string;
1025
+ css?: string;
1026
+ };
1027
+ echarts?: {
1028
+ instance?: any;
1029
+ js?: string;
1030
+ };
1031
+ };
1032
+ /**
1033
+ * 对应editorExtensions中的cdn链接标签属性
1034
+ *
1035
+ * 不要尝试在editorExtensionsAttrs定义script的src\onload\id,link的rel\href\id
1036
+ * 它们会被默认值覆盖
1037
+ */
1038
+ editorExtensionsAttrs: {
1039
+ highlight?: {
1040
+ js?: Partial<HTMLElementTagNameMap['script']>;
1041
+ css?: CodeCssAttrs;
1042
+ };
1043
+ prettier?: {
1044
+ standaloneJs?: Partial<HTMLElementTagNameMap['script']>;
1045
+ parserMarkdownJs?: Partial<HTMLElementTagNameMap['script']>;
1046
+ };
1047
+ cropper?: {
1048
+ js?: Partial<HTMLElementTagNameMap['script']>;
1049
+ css?: Partial<HTMLElementTagNameMap['link']>;
1050
+ };
1051
+ screenfull?: {
1052
+ js?: Partial<HTMLElementTagNameMap['script']>;
1053
+ };
1054
+ mermaid?: {
1055
+ js?: Partial<HTMLElementTagNameMap['script']>;
1056
+ };
1057
+ katex?: {
1058
+ js?: Partial<HTMLElementTagNameMap['script']>;
1059
+ css?: Partial<HTMLElementTagNameMap['link']>;
1060
+ };
1061
+ echarts?: {
1062
+ js?: Partial<HTMLElementTagNameMap['script']>;
1063
+ };
1064
+ };
1065
+ editorConfig: {
1066
+ /**
1067
+ * 自定义提示语言
1068
+ */
1069
+ languageUserDefined?: {
1070
+ [key: string]: StaticTextDefaultValue;
1071
+ };
1072
+ /**
1073
+ * 自定义内部mermaid模块
1074
+ */
1075
+ mermaidTemplate?: MermaidTemplate;
1076
+ /**
1077
+ * 输入渲染延迟(ms)
1078
+ */
1079
+ renderDelay?: number;
1080
+ /**
1081
+ * 内部的弹窗、下拉框等内联zIndex
1082
+ * @default 20000
1083
+ */
1084
+ zIndex?: number;
1085
+ };
1086
+ /**
1087
+ * 根据主题和内部默认的codeMirror扩展自定义新的扩展
1088
+ *
1089
+ * @params theme 当前主题
1090
+ * @params innerExtensions 当前主题下的扩展列表
1091
+ * [keymap, minimalSetup, markdown, EditorView.lineWrapping, EditorView.updateListener, EditorView.domEventHandlers, oneDark??oneLight]
1092
+ * [快捷键, 最低配置, markdown识别, 横向自动换行, 更新事件, dom监听事件, oneDark主题(暗夜模式下), oneLight(默认模式下)]
1093
+ *
1094
+ * @params keyBindings md-editor-v3内置的快捷键
1095
+ */
1096
+ codeMirrorExtensions: (extensions: Array<CodeMirrorExtension>, options: {
1097
+ editorId: string;
1098
+ theme: Themes;
1099
+ keyBindings: Array<KeyBinding>;
1100
+ }) => Array<CodeMirrorExtension>;
1101
+ /**
1102
+ * 自定义markdown-it核心库扩展、属性等
1103
+ */
1104
+ markdownItConfig: (md: markdownit, options: {
1105
+ editorId: string;
1106
+ }) => void;
1107
+ /**
1108
+ * 挑选编辑器已预设的markdownIt的扩展
1109
+ *
1110
+ * @param plugins markdownIt的扩展,带编辑器已设定的属性
1111
+ * @returns plugins
1112
+ */
1113
+ markdownItPlugins: (plugins: Array<MarkdownItConfigPlugin>, options: {
1114
+ editorId: string;
1115
+ }) => Array<MarkdownItConfigPlugin>;
1116
+ /**
1117
+ * mermaid配置项
1118
+ *
1119
+ * @param base
1120
+ * @returns
1121
+ */
1122
+ mermaidConfig: (base: any) => any;
1123
+ /**
1124
+ * katex配置
1125
+ *
1126
+ * @param baseConfig
1127
+ * @returns
1128
+ */
1129
+ katexConfig: (baseConfig: any) => any;
1130
+ /**
1131
+ * echarts配置
1132
+ *
1133
+ * @returns
1134
+ */
1135
+ echartsConfig: (base: any) => any;
1136
+ }
1137
+ /**
1138
+ * 扩展编辑器内部功能,包括marked和一些内部依赖实例,如highlight、cropper等
1139
+ */
1140
+ type Config = (options: Partial<GlobalConfig>) => void;
1141
+ /**
1142
+ * 编辑器操作潜在的错误
1143
+ */
1144
+ interface InnerError {
1145
+ name: 'Cropper' | 'fullscreen' | 'prettier' | 'overlength' | 'mermaid';
1146
+ message: string;
1147
+ data?: any;
1148
+ error?: Error;
1149
+ }
1150
+ interface CodeCss {
1151
+ [key: string]: {
1152
+ light: string;
1153
+ dark: string;
1154
+ };
1155
+ }
1156
+ interface CodeCssAttrs {
1157
+ [key: string]: {
1158
+ light: Partial<HTMLElementTagNameMap['link']>;
1159
+ dark: Partial<HTMLElementTagNameMap['link']>;
1160
+ };
1161
+ }
1162
+ type UpdateSetting = (k: keyof SettingType, v?: boolean) => void;
1163
+ type ChangeEvent = (v: string) => void;
1164
+ type SaveEvent = (v: string, h: Promise<string>) => void;
1165
+ type UploadImgCallBackParam = string[] | Array<{
1166
+ url: string;
1167
+ alt: string;
1168
+ title: string;
1169
+ }>;
1170
+ type UploadImgCallBack = (urls: UploadImgCallBackParam) => void;
1171
+ type UploadImgEvent = (files: Array<File>, callBack: UploadImgCallBack) => void;
1172
+ type HtmlChangedEvent = (h: string) => void;
1173
+ type GetCatalogEvent = (list: HeadList[]) => void;
1174
+ type ErrorEvent = (err: InnerError) => void;
1175
+ interface ExposeEvent {
1176
+ pageFullscreen(status: boolean): void;
1177
+ fullscreen(status: boolean): void;
1178
+ preview(status: boolean): void;
1179
+ previewOnly(status: boolean): void;
1180
+ htmlPreview(status: boolean): void;
1181
+ catalog(status: boolean): void;
1182
+ }
1183
+ type DOMEventHandlers = {
1184
+ [e in keyof HTMLElementEventMap]?: (event: HTMLElementEventMap[e], view: EditorView) => boolean | void;
1185
+ };
1186
+ interface InsertParam {
1187
+ targetValue: string;
1188
+ select?: boolean;
1189
+ deviationStart?: number;
1190
+ deviationEnd?: number;
1191
+ }
1192
+ /**
1193
+ * 插入的内容的构造函数
1194
+ */
1195
+ type InsertContentGenerator = (selectedText: string) => InsertParam;
1196
+ /**
1197
+ * 插入内容的通用函数类型
1198
+ */
1199
+ type Insert = (generate: InsertContentGenerator) => void;
1200
+ type FocusOption = 'start' | 'end' | {
1201
+ rangeAnchor?: number;
1202
+ rangeHead?: number;
1203
+ cursorPos: number;
1204
+ };
1205
+ interface ExposeParam {
1206
+ /**
1207
+ * 添加事件监听
1208
+ *
1209
+ * @param eventName 事件名称
1210
+ * @param callBack 事件回调函数
1211
+ */
1212
+ on<E extends keyof ExposeEvent, C extends ExposeEvent[E]>(eventName: E, callBack: C): void;
1213
+ /**
1214
+ * 切换页面内全屏
1215
+ *
1216
+ * @param status 是否页面全屏
1217
+ */
1218
+ togglePageFullscreen(status?: boolean): void;
1219
+ /**
1220
+ * 切换屏幕全屏
1221
+ *
1222
+ * @param status 是否屏幕全屏
1223
+ */
1224
+ toggleFullscreen(status?: boolean): void;
1225
+ /**
1226
+ * 切换是否显示预览
1227
+ *
1228
+ * @param status 是否显示预览
1229
+ */
1230
+ togglePreview(status?: boolean): void;
1231
+ togglePreviewOnly(status?: boolean): void;
1232
+ /**
1233
+ * 切换是否显示html预览
1234
+ *
1235
+ * @param status html预览状态
1236
+ */
1237
+ toggleHtmlPreview(status?: boolean): void;
1238
+ /**
1239
+ * 切换是否显示目录
1240
+ *
1241
+ * @param status 是否显示目录,不设置默认相反
1242
+ */
1243
+ toggleCatalog(status?: boolean): void;
1244
+ /**
1245
+ * 触发保存
1246
+ */
1247
+ triggerSave(): void;
1248
+ /**
1249
+ * 手动向文本框插入内容
1250
+ *
1251
+ * @param {Function} generate 构造插入内容方法
1252
+ * 构造方法提供「当前选中」的内容为入参
1253
+ * 返回「待插入内容」和插入的属性
1254
+ * 入参 selectedText 当前选中的内容
1255
+ *
1256
+ * targetValue 待插入内容
1257
+ * select 插入后是否自动选中内容
1258
+ * deviationStart 插入后选中位置的开始偏移量
1259
+ * deviationEnd 插入后选中位置的结束偏移量
1260
+ *
1261
+ */
1262
+ insert: Insert;
1263
+ /**
1264
+ * 手动聚焦
1265
+ *
1266
+ * @param options 聚焦时光标的位置,不提供默认上次失焦时的位置
1267
+ */
1268
+ focus(options?: FocusOption): void;
1269
+ /**
1270
+ * 手动重新渲染
1271
+ */
1272
+ rerender(): void;
1273
+ /**
1274
+ * 获取当前选中的文本
1275
+ */
1276
+ getSelectedText(): string | undefined;
1277
+ /**
1278
+ * 重置已经存在的历史记录
1279
+ */
1280
+ resetHistory(): void;
1281
+ /**
1282
+ * codemirror事件
1283
+ *
1284
+ * @param handlers
1285
+ */
1286
+ domEventHandlers(handlers: DOMEventHandlers): void;
1287
+ /**
1288
+ * 执行内部插入命令
1289
+ *
1290
+ * @param direct
1291
+ */
1292
+ execCommand(direct: ToolDirective): void;
1293
+ /**
1294
+ * 获取编辑器实例
1295
+ */
1296
+ getEditorView(): EditorView | undefined;
1297
+ }
1298
+ type ExposePreviewParam = Pick<ExposeParam, 'rerender'>;
1299
+ type EditorProps = Readonly<LooseRequired<Readonly<ExtractPropTypes<typeof editorProps>>>>;
1300
+ type MdPreviewProps = Readonly<LooseRequired<Readonly<ExtractPropTypes<typeof mdPreviewProps>>>>;
1301
+ type EditorEmits = Array<'onChange' | 'onSave' | 'onUploadImg' | 'onHtmlChanged' | 'onGetCatalog' | 'onError' | 'update:modelValue' | 'onBlur' | 'onFocus' | 'onInput' | 'onDrop' | 'oninputBoxWidthChange' | 'onRemount'>;
1302
+ type EditorContext = SetupContext<EditorEmits>;
1303
+ type CustomStrIcon = {
1304
+ copy?: string;
1305
+ 'collapse-tips'?: string;
1306
+ pin?: string;
1307
+ 'pin-off'?: string;
1308
+ check?: string;
1309
+ };
1310
+ /**
1311
+ * 自定义图标的数据类型
1312
+ */
1313
+ type CustomIcon = {
1314
+ [key in IconName]?: {
1315
+ component: Component | VNode | string;
1316
+ props?: {
1317
+ [key: string | number | symbol]: any;
1318
+ };
1319
+ };
1320
+ } & CustomStrIcon;
1321
+
1322
+ declare const Editor: vue.DefineComponent<vue.ExtractPropTypes<{
1323
+ onSave: {
1324
+ type: vue.PropType<SaveEvent>;
1325
+ default: undefined;
1326
+ };
1327
+ onUploadImg: {
1328
+ type: vue.PropType<UploadImgEvent>;
1329
+ default: undefined;
1330
+ };
1331
+ pageFullscreen: {
1332
+ type: vue.PropType<boolean>;
1333
+ default: boolean;
1334
+ };
1335
+ preview: {
1336
+ type: vue.PropType<boolean>;
1337
+ default: boolean;
1338
+ };
1339
+ htmlPreview: {
1340
+ type: vue.PropType<boolean>;
1341
+ default: boolean;
1342
+ };
1343
+ toolbars: {
1344
+ type: vue.PropType<Array<ToolbarNames>>;
1345
+ default: string[];
1346
+ };
1347
+ floatingToolbars: {
1348
+ type: vue.PropType<Array<ToolbarNames>>;
1349
+ default: never[];
1350
+ };
1351
+ toolbarsExclude: {
1352
+ type: vue.PropType<Array<ToolbarNames>>;
1353
+ default: never[];
1354
+ };
1355
+ noPrettier: {
1356
+ type: vue.PropType<boolean>;
1357
+ default: boolean;
1358
+ };
1359
+ tabWidth: {
1360
+ type: vue.PropType<number>;
1361
+ default: number;
1362
+ };
1363
+ tableShape: {
1364
+ type: vue.PropType<Array<number>>;
1365
+ default: number[];
1366
+ };
1367
+ placeholder: {
1368
+ type: vue.PropType<string>;
1369
+ default: string;
1370
+ };
1371
+ defToolbars: {
1372
+ type: vue.PropType<string | vue.VNode>;
1373
+ default: undefined;
1374
+ };
1375
+ onError: {
1376
+ type: vue.PropType<ErrorEvent>;
1377
+ default: undefined;
1378
+ };
1379
+ footers: {
1380
+ type: vue.PropType<Array<Footers>>;
1381
+ default: Footers[];
1382
+ };
1383
+ scrollAuto: {
1384
+ type: vue.PropType<boolean>;
1385
+ default: boolean;
1386
+ };
1387
+ defFooters: {
1388
+ type: vue.PropType<string | vue.VNode>;
1389
+ default: undefined;
1390
+ };
1391
+ noUploadImg: {
1392
+ type: vue.PropType<boolean>;
1393
+ default: boolean;
1394
+ };
1395
+ autoFocus: {
1396
+ type: vue.PropType<boolean>;
1397
+ default: boolean;
1398
+ };
1399
+ disabled: {
1400
+ type: vue.PropType<boolean>;
1401
+ default: boolean;
1402
+ };
1403
+ readOnly: {
1404
+ type: vue.PropType<boolean>;
1405
+ default: boolean;
1406
+ };
1407
+ maxLength: {
1408
+ type: vue.PropType<number>;
1409
+ default: undefined;
1410
+ };
1411
+ autoDetectCode: {
1412
+ type: vue.PropType<boolean>;
1413
+ default: boolean;
1414
+ };
1415
+ onBlur: {
1416
+ type: vue.PropType<(event: FocusEvent) => void>;
1417
+ default: undefined;
1418
+ };
1419
+ onFocus: {
1420
+ type: vue.PropType<(event: FocusEvent) => void>;
1421
+ default: undefined;
1422
+ };
1423
+ completions: {
1424
+ type: vue.PropType<Array<_codemirror_autocomplete.CompletionSource>>;
1425
+ default: undefined;
1426
+ };
1427
+ showToolbarName: {
1428
+ type: vue.PropType<boolean>;
1429
+ default: boolean;
1430
+ };
1431
+ onInput: {
1432
+ type: vue.PropType<(event: Event) => void>;
1433
+ default: undefined;
1434
+ };
1435
+ onDrop: {
1436
+ type: vue.PropType<(event: DragEvent) => void>;
1437
+ default: undefined;
1438
+ };
1439
+ inputBoxWidth: {
1440
+ type: vue.PropType<string>;
1441
+ default: string;
1442
+ };
1443
+ oninputBoxWidthChange: {
1444
+ type: vue.PropType<(width: string) => void>;
1445
+ default: undefined;
1446
+ };
1447
+ transformImgUrl: {
1448
+ type: vue.PropType<(t: string) => string | Promise<string>>;
1449
+ default: (t: string) => string;
1450
+ };
1451
+ catalogLayout: {
1452
+ type: vue.PropType<"fixed" | "flat">;
1453
+ default: string;
1454
+ };
1455
+ catalogMaxDepth: {
1456
+ type: vue.PropType<number>;
1457
+ default: undefined;
1458
+ };
1459
+ modelValue: {
1460
+ type: vue.PropType<string>;
1461
+ default: string;
1462
+ };
1463
+ onChange: {
1464
+ type: vue.PropType<ChangeEvent>;
1465
+ default: undefined;
1466
+ };
1467
+ theme: {
1468
+ type: vue.PropType<Themes>;
1469
+ default: string;
1470
+ };
1471
+ class: {
1472
+ type: StringConstructor;
1473
+ default: string;
1474
+ };
1475
+ language: {
1476
+ type: vue.PropType<string>;
1477
+ default: string;
1478
+ };
1479
+ onHtmlChanged: {
1480
+ type: vue.PropType<HtmlChangedEvent>;
1481
+ default: undefined;
1482
+ };
1483
+ onGetCatalog: {
1484
+ type: vue.PropType<GetCatalogEvent>;
1485
+ default: undefined;
1486
+ };
1487
+ editorId: {
1488
+ type: vue.PropType<string>;
1489
+ default: undefined;
1490
+ };
1491
+ id: {
1492
+ type: vue.PropType<string>;
1493
+ default: undefined;
1494
+ };
1495
+ showCodeRowNumber: {
1496
+ type: vue.PropType<boolean>;
1497
+ default: boolean;
1498
+ };
1499
+ previewTheme: {
1500
+ type: vue.PropType<PreviewThemes>;
1501
+ default: string;
1502
+ };
1503
+ style: {
1504
+ type: vue.PropType<vue.CSSProperties | string>;
1505
+ default: () => {};
1506
+ };
1507
+ mdHeadingId: {
1508
+ type: vue.PropType<MdHeadingId>;
1509
+ default: MdHeadingId;
1510
+ };
1511
+ sanitize: {
1512
+ type: vue.PropType<(html: string) => string>;
1513
+ default: (html: string) => string;
1514
+ };
1515
+ noMermaid: {
1516
+ type: vue.PropType<boolean>;
1517
+ default: boolean;
1518
+ };
1519
+ noKatex: {
1520
+ type: vue.PropType<boolean>;
1521
+ default: boolean;
1522
+ };
1523
+ codeTheme: {
1524
+ type: vue.PropType<string>;
1525
+ default: string;
1526
+ };
1527
+ formatCopiedText: {
1528
+ type: vue.PropType<(text: string) => string>;
1529
+ default: (text: string) => string;
1530
+ };
1531
+ codeStyleReverse: {
1532
+ type: vue.PropType<boolean>;
1533
+ default: boolean;
1534
+ };
1535
+ codeStyleReverseList: {
1536
+ type: vue.PropType<Array<string>>;
1537
+ default: string[];
1538
+ };
1539
+ noHighlight: {
1540
+ type: vue.PropType<boolean>;
1541
+ default: boolean;
1542
+ };
1543
+ noImgZoomIn: {
1544
+ type: vue.PropType<boolean>;
1545
+ default: boolean;
1546
+ };
1547
+ customIcon: {
1548
+ type: vue.PropType<CustomIcon>;
1549
+ default: {};
1550
+ };
1551
+ sanitizeMermaid: {
1552
+ type: vue.PropType<(h: string) => Promise<string>>;
1553
+ default: (h: string) => Promise<string>;
1554
+ };
1555
+ codeFoldable: {
1556
+ type: vue.PropType<boolean>;
1557
+ default: boolean;
1558
+ };
1559
+ autoFoldThreshold: {
1560
+ type: vue.PropType<number>;
1561
+ default: number;
1562
+ };
1563
+ onRemount: {
1564
+ type: vue.PropType<() => void>;
1565
+ default: undefined;
1566
+ };
1567
+ noEcharts: {
1568
+ type: vue.PropType<boolean>;
1569
+ default: boolean;
1570
+ };
1571
+ previewComponent: {
1572
+ type: vue.PropType<vue.Component>;
1573
+ default: undefined;
1574
+ };
1575
+ }>, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, EditorEmits, "onChange" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "onError" | "update:modelValue" | "onBlur" | "onFocus" | "onInput" | "onDrop" | "oninputBoxWidthChange" | "onRemount", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
1576
+ onSave: {
1577
+ type: vue.PropType<SaveEvent>;
1578
+ default: undefined;
1579
+ };
1580
+ onUploadImg: {
1581
+ type: vue.PropType<UploadImgEvent>;
1582
+ default: undefined;
1583
+ };
1584
+ pageFullscreen: {
1585
+ type: vue.PropType<boolean>;
1586
+ default: boolean;
1587
+ };
1588
+ preview: {
1589
+ type: vue.PropType<boolean>;
1590
+ default: boolean;
1591
+ };
1592
+ htmlPreview: {
1593
+ type: vue.PropType<boolean>;
1594
+ default: boolean;
1595
+ };
1596
+ toolbars: {
1597
+ type: vue.PropType<Array<ToolbarNames>>;
1598
+ default: string[];
1599
+ };
1600
+ floatingToolbars: {
1601
+ type: vue.PropType<Array<ToolbarNames>>;
1602
+ default: never[];
1603
+ };
1604
+ toolbarsExclude: {
1605
+ type: vue.PropType<Array<ToolbarNames>>;
1606
+ default: never[];
1607
+ };
1608
+ noPrettier: {
1609
+ type: vue.PropType<boolean>;
1610
+ default: boolean;
1611
+ };
1612
+ tabWidth: {
1613
+ type: vue.PropType<number>;
1614
+ default: number;
1615
+ };
1616
+ tableShape: {
1617
+ type: vue.PropType<Array<number>>;
1618
+ default: number[];
1619
+ };
1620
+ placeholder: {
1621
+ type: vue.PropType<string>;
1622
+ default: string;
1623
+ };
1624
+ defToolbars: {
1625
+ type: vue.PropType<string | vue.VNode>;
1626
+ default: undefined;
1627
+ };
1628
+ onError: {
1629
+ type: vue.PropType<ErrorEvent>;
1630
+ default: undefined;
1631
+ };
1632
+ footers: {
1633
+ type: vue.PropType<Array<Footers>>;
1634
+ default: Footers[];
1635
+ };
1636
+ scrollAuto: {
1637
+ type: vue.PropType<boolean>;
1638
+ default: boolean;
1639
+ };
1640
+ defFooters: {
1641
+ type: vue.PropType<string | vue.VNode>;
1642
+ default: undefined;
1643
+ };
1644
+ noUploadImg: {
1645
+ type: vue.PropType<boolean>;
1646
+ default: boolean;
1647
+ };
1648
+ autoFocus: {
1649
+ type: vue.PropType<boolean>;
1650
+ default: boolean;
1651
+ };
1652
+ disabled: {
1653
+ type: vue.PropType<boolean>;
1654
+ default: boolean;
1655
+ };
1656
+ readOnly: {
1657
+ type: vue.PropType<boolean>;
1658
+ default: boolean;
1659
+ };
1660
+ maxLength: {
1661
+ type: vue.PropType<number>;
1662
+ default: undefined;
1663
+ };
1664
+ autoDetectCode: {
1665
+ type: vue.PropType<boolean>;
1666
+ default: boolean;
1667
+ };
1668
+ onBlur: {
1669
+ type: vue.PropType<(event: FocusEvent) => void>;
1670
+ default: undefined;
1671
+ };
1672
+ onFocus: {
1673
+ type: vue.PropType<(event: FocusEvent) => void>;
1674
+ default: undefined;
1675
+ };
1676
+ completions: {
1677
+ type: vue.PropType<Array<_codemirror_autocomplete.CompletionSource>>;
1678
+ default: undefined;
1679
+ };
1680
+ showToolbarName: {
1681
+ type: vue.PropType<boolean>;
1682
+ default: boolean;
1683
+ };
1684
+ onInput: {
1685
+ type: vue.PropType<(event: Event) => void>;
1686
+ default: undefined;
1687
+ };
1688
+ onDrop: {
1689
+ type: vue.PropType<(event: DragEvent) => void>;
1690
+ default: undefined;
1691
+ };
1692
+ inputBoxWidth: {
1693
+ type: vue.PropType<string>;
1694
+ default: string;
1695
+ };
1696
+ oninputBoxWidthChange: {
1697
+ type: vue.PropType<(width: string) => void>;
1698
+ default: undefined;
1699
+ };
1700
+ transformImgUrl: {
1701
+ type: vue.PropType<(t: string) => string | Promise<string>>;
1702
+ default: (t: string) => string;
1703
+ };
1704
+ catalogLayout: {
1705
+ type: vue.PropType<"fixed" | "flat">;
1706
+ default: string;
1707
+ };
1708
+ catalogMaxDepth: {
1709
+ type: vue.PropType<number>;
1710
+ default: undefined;
1711
+ };
1712
+ modelValue: {
1713
+ type: vue.PropType<string>;
1714
+ default: string;
1715
+ };
1716
+ onChange: {
1717
+ type: vue.PropType<ChangeEvent>;
1718
+ default: undefined;
1719
+ };
1720
+ theme: {
1721
+ type: vue.PropType<Themes>;
1722
+ default: string;
1723
+ };
1724
+ class: {
1725
+ type: StringConstructor;
1726
+ default: string;
1727
+ };
1728
+ language: {
1729
+ type: vue.PropType<string>;
1730
+ default: string;
1731
+ };
1732
+ onHtmlChanged: {
1733
+ type: vue.PropType<HtmlChangedEvent>;
1734
+ default: undefined;
1735
+ };
1736
+ onGetCatalog: {
1737
+ type: vue.PropType<GetCatalogEvent>;
1738
+ default: undefined;
1739
+ };
1740
+ editorId: {
1741
+ type: vue.PropType<string>;
1742
+ default: undefined;
1743
+ };
1744
+ id: {
1745
+ type: vue.PropType<string>;
1746
+ default: undefined;
1747
+ };
1748
+ showCodeRowNumber: {
1749
+ type: vue.PropType<boolean>;
1750
+ default: boolean;
1751
+ };
1752
+ previewTheme: {
1753
+ type: vue.PropType<PreviewThemes>;
1754
+ default: string;
1755
+ };
1756
+ style: {
1757
+ type: vue.PropType<vue.CSSProperties | string>;
1758
+ default: () => {};
1759
+ };
1760
+ mdHeadingId: {
1761
+ type: vue.PropType<MdHeadingId>;
1762
+ default: MdHeadingId;
1763
+ };
1764
+ sanitize: {
1765
+ type: vue.PropType<(html: string) => string>;
1766
+ default: (html: string) => string;
1767
+ };
1768
+ noMermaid: {
1769
+ type: vue.PropType<boolean>;
1770
+ default: boolean;
1771
+ };
1772
+ noKatex: {
1773
+ type: vue.PropType<boolean>;
1774
+ default: boolean;
1775
+ };
1776
+ codeTheme: {
1777
+ type: vue.PropType<string>;
1778
+ default: string;
1779
+ };
1780
+ formatCopiedText: {
1781
+ type: vue.PropType<(text: string) => string>;
1782
+ default: (text: string) => string;
1783
+ };
1784
+ codeStyleReverse: {
1785
+ type: vue.PropType<boolean>;
1786
+ default: boolean;
1787
+ };
1788
+ codeStyleReverseList: {
1789
+ type: vue.PropType<Array<string>>;
1790
+ default: string[];
1791
+ };
1792
+ noHighlight: {
1793
+ type: vue.PropType<boolean>;
1794
+ default: boolean;
1795
+ };
1796
+ noImgZoomIn: {
1797
+ type: vue.PropType<boolean>;
1798
+ default: boolean;
1799
+ };
1800
+ customIcon: {
1801
+ type: vue.PropType<CustomIcon>;
1802
+ default: {};
1803
+ };
1804
+ sanitizeMermaid: {
1805
+ type: vue.PropType<(h: string) => Promise<string>>;
1806
+ default: (h: string) => Promise<string>;
1807
+ };
1808
+ codeFoldable: {
1809
+ type: vue.PropType<boolean>;
1810
+ default: boolean;
1811
+ };
1812
+ autoFoldThreshold: {
1813
+ type: vue.PropType<number>;
1814
+ default: number;
1815
+ };
1816
+ onRemount: {
1817
+ type: vue.PropType<() => void>;
1818
+ default: undefined;
1819
+ };
1820
+ noEcharts: {
1821
+ type: vue.PropType<boolean>;
1822
+ default: boolean;
1823
+ };
1824
+ previewComponent: {
1825
+ type: vue.PropType<vue.Component>;
1826
+ default: undefined;
1827
+ };
1828
+ }>> & Readonly<{
1829
+ onOnChange?: ((...args: any[]) => any) | undefined;
1830
+ onOnSave?: ((...args: any[]) => any) | undefined;
1831
+ onOnUploadImg?: ((...args: any[]) => any) | undefined;
1832
+ onOnHtmlChanged?: ((...args: any[]) => any) | undefined;
1833
+ onOnGetCatalog?: ((...args: any[]) => any) | undefined;
1834
+ onOnError?: ((...args: any[]) => any) | undefined;
1835
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
1836
+ onOnBlur?: ((...args: any[]) => any) | undefined;
1837
+ onOnFocus?: ((...args: any[]) => any) | undefined;
1838
+ onOnInput?: ((...args: any[]) => any) | undefined;
1839
+ onOnDrop?: ((...args: any[]) => any) | undefined;
1840
+ onOninputBoxWidthChange?: ((...args: any[]) => any) | undefined;
1841
+ onOnRemount?: ((...args: any[]) => any) | undefined;
1842
+ }>, {
1843
+ language: string;
1844
+ theme: Themes;
1845
+ previewTheme: string;
1846
+ codeTheme: string;
1847
+ disabled: boolean;
1848
+ showToolbarName: boolean;
1849
+ preview: boolean;
1850
+ pageFullscreen: boolean;
1851
+ htmlPreview: boolean;
1852
+ onChange: ChangeEvent;
1853
+ onSave: SaveEvent;
1854
+ onUploadImg: UploadImgEvent;
1855
+ onHtmlChanged: HtmlChangedEvent;
1856
+ onGetCatalog: GetCatalogEvent;
1857
+ onError: ErrorEvent;
1858
+ onBlur: (event: FocusEvent) => void;
1859
+ onFocus: (event: FocusEvent) => void;
1860
+ onInput: (event: Event) => void;
1861
+ onDrop: (event: DragEvent) => void;
1862
+ oninputBoxWidthChange: (width: string) => void;
1863
+ onRemount: () => void;
1864
+ toolbars: ToolbarNames[];
1865
+ floatingToolbars: ToolbarNames[];
1866
+ toolbarsExclude: ToolbarNames[];
1867
+ noPrettier: boolean;
1868
+ tabWidth: number;
1869
+ tableShape: number[];
1870
+ placeholder: string;
1871
+ defToolbars: string | vue.VNode<vue.RendererNode, vue.RendererElement, {
1872
+ [key: string]: any;
1873
+ }>;
1874
+ footers: Footers[];
1875
+ scrollAuto: boolean;
1876
+ defFooters: string | vue.VNode<vue.RendererNode, vue.RendererElement, {
1877
+ [key: string]: any;
1878
+ }>;
1879
+ noUploadImg: boolean;
1880
+ autoFocus: boolean;
1881
+ readOnly: boolean;
1882
+ maxLength: number;
1883
+ autoDetectCode: boolean;
1884
+ completions: _codemirror_autocomplete.CompletionSource[];
1885
+ inputBoxWidth: string;
1886
+ transformImgUrl: (t: string) => string | Promise<string>;
1887
+ catalogLayout: "flat" | "fixed";
1888
+ catalogMaxDepth: number;
1889
+ modelValue: string;
1890
+ class: string;
1891
+ editorId: string;
1892
+ id: string;
1893
+ showCodeRowNumber: boolean;
1894
+ style: string | vue.CSSProperties;
1895
+ mdHeadingId: MdHeadingId;
1896
+ sanitize: (html: string) => string;
1897
+ noMermaid: boolean;
1898
+ noKatex: boolean;
1899
+ formatCopiedText: (text: string) => string;
1900
+ codeStyleReverse: boolean;
1901
+ codeStyleReverseList: string[];
1902
+ noHighlight: boolean;
1903
+ noImgZoomIn: boolean;
1904
+ customIcon: CustomIcon;
1905
+ sanitizeMermaid: (h: string) => Promise<string>;
1906
+ codeFoldable: boolean;
1907
+ autoFoldThreshold: number;
1908
+ noEcharts: boolean;
1909
+ previewComponent: vue.Component;
1910
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
1911
+
1912
+ declare const _default$c: typeof Editor & {
1913
+ install: (app: App) => App;
1914
+ };
1915
+
1916
+ declare const _default$b: vue.DefineComponent<vue.ExtractPropTypes<{
1917
+ title: {
1918
+ type: PropType<string>;
1919
+ default: string;
1920
+ };
1921
+ /**
1922
+ * 展示在工具栏的内容,通常是个图标
1923
+ *
1924
+ * @deprecated 使用默认插槽代替
1925
+ */
1926
+ trigger: {
1927
+ type: PropType<string | VNode>;
1928
+ default: undefined;
1929
+ };
1930
+ onClick: {
1931
+ type: PropType<(e: MouseEvent) => void>;
1932
+ default: undefined;
1933
+ };
1934
+ /**
1935
+ * ==没有意义,仅用于规避克隆组件自动嵌入insert方法时,传入的是该组件而产生的waring
1936
+ */
1937
+ insert: {
1938
+ type: PropType<() => void>;
1939
+ default: undefined;
1940
+ };
1941
+ language: {
1942
+ type: PropType<string>;
1943
+ default: undefined;
1944
+ };
1945
+ theme: {
1946
+ type: PropType<Themes>;
1947
+ default: undefined;
1948
+ };
1949
+ previewTheme: {
1950
+ type: PropType<PreviewThemes>;
1951
+ default: undefined;
1952
+ };
1953
+ codeTheme: {
1954
+ type: PropType<string>;
1955
+ default: undefined;
1956
+ };
1957
+ disabled: {
1958
+ type: PropType<boolean>;
1959
+ default: undefined;
1960
+ };
1961
+ showToolbarName: {
1962
+ type: PropType<boolean>;
1963
+ default: undefined;
1964
+ };
1965
+ }>, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "onClick"[], "onClick", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
1966
+ title: {
1967
+ type: PropType<string>;
1968
+ default: string;
1969
+ };
1970
+ /**
1971
+ * 展示在工具栏的内容,通常是个图标
1972
+ *
1973
+ * @deprecated 使用默认插槽代替
1974
+ */
1975
+ trigger: {
1976
+ type: PropType<string | VNode>;
1977
+ default: undefined;
1978
+ };
1979
+ onClick: {
1980
+ type: PropType<(e: MouseEvent) => void>;
1981
+ default: undefined;
1982
+ };
1983
+ /**
1984
+ * ==没有意义,仅用于规避克隆组件自动嵌入insert方法时,传入的是该组件而产生的waring
1985
+ */
1986
+ insert: {
1987
+ type: PropType<() => void>;
1988
+ default: undefined;
1989
+ };
1990
+ language: {
1991
+ type: PropType<string>;
1992
+ default: undefined;
1993
+ };
1994
+ theme: {
1995
+ type: PropType<Themes>;
1996
+ default: undefined;
1997
+ };
1998
+ previewTheme: {
1999
+ type: PropType<PreviewThemes>;
2000
+ default: undefined;
2001
+ };
2002
+ codeTheme: {
2003
+ type: PropType<string>;
2004
+ default: undefined;
2005
+ };
2006
+ disabled: {
2007
+ type: PropType<boolean>;
2008
+ default: undefined;
2009
+ };
2010
+ showToolbarName: {
2011
+ type: PropType<boolean>;
2012
+ default: undefined;
2013
+ };
2014
+ }>> & Readonly<{
2015
+ onOnClick?: ((...args: any[]) => any) | undefined;
2016
+ }>, {
2017
+ onClick: (e: MouseEvent) => void;
2018
+ title: string;
2019
+ trigger: string | VNode<vue.RendererNode, vue.RendererElement, {
2020
+ [key: string]: any;
2021
+ }>;
2022
+ insert: () => void;
2023
+ language: string;
2024
+ theme: Themes;
2025
+ previewTheme: string;
2026
+ codeTheme: string;
2027
+ disabled: boolean;
2028
+ showToolbarName: boolean;
2029
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
2030
+
2031
+ declare const _default$a: typeof _default$b & {
2032
+ install: (app: App) => App;
2033
+ };
2034
+
2035
+ declare const _default$9: vue.DefineComponent<vue.ExtractPropTypes<{
2036
+ title: {
2037
+ type: PropType<string>;
2038
+ default: string;
2039
+ };
2040
+ visible: {
2041
+ type: PropType<boolean>;
2042
+ default: undefined;
2043
+ };
2044
+ /**
2045
+ * 展示在工具栏的内容,通常是个图标
2046
+ *
2047
+ * @deprecated 使用默认插槽代替
2048
+ */
2049
+ trigger: {
2050
+ type: PropType<string | VNode>;
2051
+ default: undefined;
2052
+ };
2053
+ onChange: {
2054
+ type: PropType<(visible: boolean) => void>;
2055
+ default: undefined;
2056
+ };
2057
+ overlay: {
2058
+ type: PropType<string | VNode>;
2059
+ default: undefined;
2060
+ };
2061
+ /**
2062
+ * ==没有意义,仅用于规避克隆组件自动嵌入insert方法时,传入的是该组件而产生的waring
2063
+ */
2064
+ insert: {
2065
+ type: PropType<() => void>;
2066
+ default: undefined;
2067
+ };
2068
+ language: {
2069
+ type: PropType<string>;
2070
+ default: undefined;
2071
+ };
2072
+ theme: {
2073
+ type: PropType<Themes>;
2074
+ default: undefined;
2075
+ };
2076
+ previewTheme: {
2077
+ type: PropType<PreviewThemes>;
2078
+ default: undefined;
2079
+ };
2080
+ codeTheme: {
2081
+ type: PropType<string>;
2082
+ default: undefined;
2083
+ };
2084
+ disabled: {
2085
+ type: PropType<boolean>;
2086
+ default: undefined;
2087
+ };
2088
+ showToolbarName: {
2089
+ type: PropType<boolean>;
2090
+ default: undefined;
2091
+ };
2092
+ }>, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "onChange"[], "onChange", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
2093
+ title: {
2094
+ type: PropType<string>;
2095
+ default: string;
2096
+ };
2097
+ visible: {
2098
+ type: PropType<boolean>;
2099
+ default: undefined;
2100
+ };
2101
+ /**
2102
+ * 展示在工具栏的内容,通常是个图标
2103
+ *
2104
+ * @deprecated 使用默认插槽代替
2105
+ */
2106
+ trigger: {
2107
+ type: PropType<string | VNode>;
2108
+ default: undefined;
2109
+ };
2110
+ onChange: {
2111
+ type: PropType<(visible: boolean) => void>;
2112
+ default: undefined;
2113
+ };
2114
+ overlay: {
2115
+ type: PropType<string | VNode>;
2116
+ default: undefined;
2117
+ };
2118
+ /**
2119
+ * ==没有意义,仅用于规避克隆组件自动嵌入insert方法时,传入的是该组件而产生的waring
2120
+ */
2121
+ insert: {
2122
+ type: PropType<() => void>;
2123
+ default: undefined;
2124
+ };
2125
+ language: {
2126
+ type: PropType<string>;
2127
+ default: undefined;
2128
+ };
2129
+ theme: {
2130
+ type: PropType<Themes>;
2131
+ default: undefined;
2132
+ };
2133
+ previewTheme: {
2134
+ type: PropType<PreviewThemes>;
2135
+ default: undefined;
2136
+ };
2137
+ codeTheme: {
2138
+ type: PropType<string>;
2139
+ default: undefined;
2140
+ };
2141
+ disabled: {
2142
+ type: PropType<boolean>;
2143
+ default: undefined;
2144
+ };
2145
+ showToolbarName: {
2146
+ type: PropType<boolean>;
2147
+ default: undefined;
2148
+ };
2149
+ }>> & Readonly<{
2150
+ onOnChange?: ((...args: any[]) => any) | undefined;
2151
+ }>, {
2152
+ title: string;
2153
+ trigger: string | VNode<vue.RendererNode, vue.RendererElement, {
2154
+ [key: string]: any;
2155
+ }>;
2156
+ insert: () => void;
2157
+ language: string;
2158
+ theme: Themes;
2159
+ previewTheme: string;
2160
+ codeTheme: string;
2161
+ disabled: boolean;
2162
+ showToolbarName: boolean;
2163
+ onChange: (visible: boolean) => void;
2164
+ visible: boolean;
2165
+ overlay: string | VNode<vue.RendererNode, vue.RendererElement, {
2166
+ [key: string]: any;
2167
+ }>;
2168
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
2169
+
2170
+ declare const _default$8: typeof _default$9 & {
2171
+ install: (app: App) => App;
2172
+ };
2173
+
2174
+ declare const _default$7: vue.DefineComponent<vue.ExtractPropTypes<{
2175
+ title: {
2176
+ type: PropType<string>;
2177
+ default: string;
2178
+ };
2179
+ modalTitle: {
2180
+ type: PropType<string | VNode>;
2181
+ default: string;
2182
+ };
2183
+ visible: {
2184
+ type: PropType<boolean>;
2185
+ default: undefined;
2186
+ };
2187
+ width: {
2188
+ type: PropType<string>;
2189
+ default: string;
2190
+ };
2191
+ height: {
2192
+ type: PropType<string>;
2193
+ default: string;
2194
+ };
2195
+ trigger: {
2196
+ type: PropType<string | VNode>;
2197
+ default: undefined;
2198
+ };
2199
+ onClick: {
2200
+ type: PropType<() => void>;
2201
+ default: undefined;
2202
+ };
2203
+ onClose: {
2204
+ type: PropType<() => void>;
2205
+ default: undefined;
2206
+ };
2207
+ /**
2208
+ * 显示全屏按钮
2209
+ */
2210
+ showAdjust: {
2211
+ type: PropType<boolean>;
2212
+ default: boolean;
2213
+ };
2214
+ isFullscreen: {
2215
+ type: PropType<boolean>;
2216
+ default: boolean;
2217
+ };
2218
+ onAdjust: {
2219
+ type: PropType<(val: boolean) => void>;
2220
+ default: undefined;
2221
+ };
2222
+ class: {
2223
+ type: PropType<string>;
2224
+ default: undefined;
2225
+ };
2226
+ style: {
2227
+ type: PropType<CSSProperties | string>;
2228
+ default: undefined;
2229
+ };
2230
+ showMask: {
2231
+ type: PropType<boolean>;
2232
+ default: boolean;
2233
+ };
2234
+ /**
2235
+ * ==没有意义,仅用于规避克隆组件自动嵌入insert方法时,传入的是该组件而产生的waring
2236
+ */
2237
+ insert: {
2238
+ type: PropType<() => void>;
2239
+ default: undefined;
2240
+ };
2241
+ language: {
2242
+ type: PropType<string>;
2243
+ default: undefined;
2244
+ };
2245
+ theme: {
2246
+ type: PropType<Themes>;
2247
+ default: undefined;
2248
+ };
2249
+ previewTheme: {
2250
+ type: PropType<PreviewThemes>;
2251
+ default: undefined;
2252
+ };
2253
+ codeTheme: {
2254
+ type: PropType<string>;
2255
+ default: undefined;
2256
+ };
2257
+ disabled: {
2258
+ type: PropType<boolean>;
2259
+ default: undefined;
2260
+ };
2261
+ showToolbarName: {
2262
+ type: PropType<boolean>;
2263
+ default: undefined;
2264
+ };
2265
+ }>, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("onClick" | "onClose" | "onAdjust")[], "onClick" | "onClose" | "onAdjust", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
2266
+ title: {
2267
+ type: PropType<string>;
2268
+ default: string;
2269
+ };
2270
+ modalTitle: {
2271
+ type: PropType<string | VNode>;
2272
+ default: string;
2273
+ };
2274
+ visible: {
2275
+ type: PropType<boolean>;
2276
+ default: undefined;
2277
+ };
2278
+ width: {
2279
+ type: PropType<string>;
2280
+ default: string;
2281
+ };
2282
+ height: {
2283
+ type: PropType<string>;
2284
+ default: string;
2285
+ };
2286
+ trigger: {
2287
+ type: PropType<string | VNode>;
2288
+ default: undefined;
2289
+ };
2290
+ onClick: {
2291
+ type: PropType<() => void>;
2292
+ default: undefined;
2293
+ };
2294
+ onClose: {
2295
+ type: PropType<() => void>;
2296
+ default: undefined;
2297
+ };
2298
+ /**
2299
+ * 显示全屏按钮
2300
+ */
2301
+ showAdjust: {
2302
+ type: PropType<boolean>;
2303
+ default: boolean;
2304
+ };
2305
+ isFullscreen: {
2306
+ type: PropType<boolean>;
2307
+ default: boolean;
2308
+ };
2309
+ onAdjust: {
2310
+ type: PropType<(val: boolean) => void>;
2311
+ default: undefined;
2312
+ };
2313
+ class: {
2314
+ type: PropType<string>;
2315
+ default: undefined;
2316
+ };
2317
+ style: {
2318
+ type: PropType<CSSProperties | string>;
2319
+ default: undefined;
2320
+ };
2321
+ showMask: {
2322
+ type: PropType<boolean>;
2323
+ default: boolean;
2324
+ };
2325
+ /**
2326
+ * ==没有意义,仅用于规避克隆组件自动嵌入insert方法时,传入的是该组件而产生的waring
2327
+ */
2328
+ insert: {
2329
+ type: PropType<() => void>;
2330
+ default: undefined;
2331
+ };
2332
+ language: {
2333
+ type: PropType<string>;
2334
+ default: undefined;
2335
+ };
2336
+ theme: {
2337
+ type: PropType<Themes>;
2338
+ default: undefined;
2339
+ };
2340
+ previewTheme: {
2341
+ type: PropType<PreviewThemes>;
2342
+ default: undefined;
2343
+ };
2344
+ codeTheme: {
2345
+ type: PropType<string>;
2346
+ default: undefined;
2347
+ };
2348
+ disabled: {
2349
+ type: PropType<boolean>;
2350
+ default: undefined;
2351
+ };
2352
+ showToolbarName: {
2353
+ type: PropType<boolean>;
2354
+ default: undefined;
2355
+ };
2356
+ }>> & Readonly<{
2357
+ onOnClick?: ((...args: any[]) => any) | undefined;
2358
+ onOnClose?: ((...args: any[]) => any) | undefined;
2359
+ onOnAdjust?: ((...args: any[]) => any) | undefined;
2360
+ }>, {
2361
+ onClick: () => void;
2362
+ title: string;
2363
+ trigger: string | VNode<vue.RendererNode, vue.RendererElement, {
2364
+ [key: string]: any;
2365
+ }>;
2366
+ insert: () => void;
2367
+ language: string;
2368
+ theme: Themes;
2369
+ previewTheme: string;
2370
+ codeTheme: string;
2371
+ disabled: boolean;
2372
+ showToolbarName: boolean;
2373
+ class: string;
2374
+ style: string | CSSProperties;
2375
+ visible: boolean;
2376
+ onClose: () => void;
2377
+ onAdjust: (val: boolean) => void;
2378
+ modalTitle: string | VNode<vue.RendererNode, vue.RendererElement, {
2379
+ [key: string]: any;
2380
+ }>;
2381
+ width: string;
2382
+ height: string;
2383
+ showAdjust: boolean;
2384
+ isFullscreen: boolean;
2385
+ showMask: boolean;
2386
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
2387
+
2388
+ declare const _default$6: typeof _default$7 & {
2389
+ install: (app: App) => App;
2390
+ };
2391
+
2392
+ declare const _default$5: vue.DefineComponent<vue.ExtractPropTypes<{
2393
+ title: {
2394
+ type: PropType<string | VNode | VNode[]>;
2395
+ default: string;
2396
+ };
2397
+ visible: {
2398
+ type: PropType<boolean>;
2399
+ default: boolean;
2400
+ };
2401
+ width: {
2402
+ type: PropType<string>;
2403
+ default: string;
2404
+ };
2405
+ height: {
2406
+ type: PropType<string>;
2407
+ default: string;
2408
+ };
2409
+ onClose: {
2410
+ type: PropType<() => void>;
2411
+ };
2412
+ showAdjust: {
2413
+ type: PropType<boolean>;
2414
+ default: boolean;
2415
+ };
2416
+ isFullscreen: {
2417
+ type: PropType<boolean>;
2418
+ default: boolean;
2419
+ };
2420
+ onAdjust: {
2421
+ type: PropType<(val: boolean) => void>;
2422
+ default: () => void;
2423
+ };
2424
+ class: {
2425
+ type: PropType<string>;
2426
+ default: undefined;
2427
+ };
2428
+ style: {
2429
+ type: PropType<CSSProperties | string>;
2430
+ default: () => {};
2431
+ };
2432
+ showMask: {
2433
+ type: PropType<boolean>;
2434
+ default: boolean;
2435
+ };
2436
+ }>, () => "" | vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "onClose"[], "onClose", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
2437
+ title: {
2438
+ type: PropType<string | VNode | VNode[]>;
2439
+ default: string;
2440
+ };
2441
+ visible: {
2442
+ type: PropType<boolean>;
2443
+ default: boolean;
2444
+ };
2445
+ width: {
2446
+ type: PropType<string>;
2447
+ default: string;
2448
+ };
2449
+ height: {
2450
+ type: PropType<string>;
2451
+ default: string;
2452
+ };
2453
+ onClose: {
2454
+ type: PropType<() => void>;
2455
+ };
2456
+ showAdjust: {
2457
+ type: PropType<boolean>;
2458
+ default: boolean;
2459
+ };
2460
+ isFullscreen: {
2461
+ type: PropType<boolean>;
2462
+ default: boolean;
2463
+ };
2464
+ onAdjust: {
2465
+ type: PropType<(val: boolean) => void>;
2466
+ default: () => void;
2467
+ };
2468
+ class: {
2469
+ type: PropType<string>;
2470
+ default: undefined;
2471
+ };
2472
+ style: {
2473
+ type: PropType<CSSProperties | string>;
2474
+ default: () => {};
2475
+ };
2476
+ showMask: {
2477
+ type: PropType<boolean>;
2478
+ default: boolean;
2479
+ };
2480
+ }>> & Readonly<{
2481
+ onOnClose?: ((...args: any[]) => any) | undefined;
2482
+ }>, {
2483
+ title: string | VNode<vue.RendererNode, vue.RendererElement, {
2484
+ [key: string]: any;
2485
+ }> | VNode<vue.RendererNode, vue.RendererElement, {
2486
+ [key: string]: any;
2487
+ }>[];
2488
+ class: string;
2489
+ style: string | CSSProperties;
2490
+ visible: boolean;
2491
+ onAdjust: (val: boolean) => void;
2492
+ width: string;
2493
+ height: string;
2494
+ showAdjust: boolean;
2495
+ isFullscreen: boolean;
2496
+ showMask: boolean;
2497
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
2498
+
2499
+ declare const _default$4: typeof _default$5 & {
2500
+ install: (app: App) => App;
2501
+ };
2502
+
2503
+ declare const StrIcon: (name: keyof CustomStrIcon, customIcon: CustomIcon) => string;
2504
+
2505
+ declare const _default$3: vue.DefineComponent<vue.ExtractPropTypes<{
2506
+ onClick: {
2507
+ type: PropType<(e: MouseEvent) => void>;
2508
+ default: undefined;
2509
+ };
2510
+ /**
2511
+ * ==没有意义,仅用于规避克隆组件自动嵌入insert方法时,传入的是该组件而产生的waring
2512
+ */
2513
+ language: {
2514
+ type: PropType<string>;
2515
+ default: undefined;
2516
+ };
2517
+ theme: {
2518
+ type: PropType<Themes>;
2519
+ default: undefined;
2520
+ };
2521
+ disabled: {
2522
+ type: PropType<boolean>;
2523
+ default: undefined;
2524
+ };
2525
+ }>, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "onClick"[], "onClick", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
2526
+ onClick: {
2527
+ type: PropType<(e: MouseEvent) => void>;
2528
+ default: undefined;
2529
+ };
2530
+ /**
2531
+ * ==没有意义,仅用于规避克隆组件自动嵌入insert方法时,传入的是该组件而产生的waring
2532
+ */
2533
+ language: {
2534
+ type: PropType<string>;
2535
+ default: undefined;
2536
+ };
2537
+ theme: {
2538
+ type: PropType<Themes>;
2539
+ default: undefined;
2540
+ };
2541
+ disabled: {
2542
+ type: PropType<boolean>;
2543
+ default: undefined;
2544
+ };
2545
+ }>> & Readonly<{
2546
+ onOnClick?: ((...args: any[]) => any) | undefined;
2547
+ }>, {
2548
+ onClick: (e: MouseEvent) => void;
2549
+ language: string;
2550
+ theme: Themes;
2551
+ disabled: boolean;
2552
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
2553
+
2554
+ declare const _default$2: typeof _default$3 & {
2555
+ install: (app: App) => App;
2556
+ };
2557
+
2558
+ declare const MdPreview: vue.DefineComponent<{
2559
+ readonly language: string;
2560
+ readonly theme: Themes;
2561
+ readonly previewTheme: string;
2562
+ readonly codeTheme: string;
2563
+ readonly modelValue: string;
2564
+ readonly class: string;
2565
+ readonly showCodeRowNumber: boolean;
2566
+ readonly style: string | vue.CSSProperties;
2567
+ readonly mdHeadingId: MdHeadingId;
2568
+ readonly sanitize: (html: string) => string;
2569
+ readonly noMermaid: boolean;
2570
+ readonly noKatex: boolean;
2571
+ readonly formatCopiedText: (text: string) => string;
2572
+ readonly codeStyleReverse: boolean;
2573
+ readonly codeStyleReverseList: string[];
2574
+ readonly noHighlight: boolean;
2575
+ readonly noImgZoomIn: boolean;
2576
+ readonly customIcon: {
2577
+ title?: {
2578
+ component: vue.Component | vue.VNode | string;
2579
+ props?: {
2580
+ [key: string | number | symbol]: any;
2581
+ };
2582
+ } | undefined;
2583
+ bold?: {
2584
+ component: vue.Component | vue.VNode | string;
2585
+ props?: {
2586
+ [key: string | number | symbol]: any;
2587
+ };
2588
+ } | undefined;
2589
+ underline?: {
2590
+ component: vue.Component | vue.VNode | string;
2591
+ props?: {
2592
+ [key: string | number | symbol]: any;
2593
+ };
2594
+ } | undefined;
2595
+ italic?: {
2596
+ component: vue.Component | vue.VNode | string;
2597
+ props?: {
2598
+ [key: string | number | symbol]: any;
2599
+ };
2600
+ } | undefined;
2601
+ "strike-through"?: {
2602
+ component: vue.Component | vue.VNode | string;
2603
+ props?: {
2604
+ [key: string | number | symbol]: any;
2605
+ };
2606
+ } | undefined;
2607
+ sub?: {
2608
+ component: vue.Component | vue.VNode | string;
2609
+ props?: {
2610
+ [key: string | number | symbol]: any;
2611
+ };
2612
+ } | undefined;
2613
+ sup?: {
2614
+ component: vue.Component | vue.VNode | string;
2615
+ props?: {
2616
+ [key: string | number | symbol]: any;
2617
+ };
2618
+ } | undefined;
2619
+ quote?: {
2620
+ component: vue.Component | vue.VNode | string;
2621
+ props?: {
2622
+ [key: string | number | symbol]: any;
2623
+ };
2624
+ } | undefined;
2625
+ "unordered-list"?: {
2626
+ component: vue.Component | vue.VNode | string;
2627
+ props?: {
2628
+ [key: string | number | symbol]: any;
2629
+ };
2630
+ } | undefined;
2631
+ "ordered-list"?: {
2632
+ component: vue.Component | vue.VNode | string;
2633
+ props?: {
2634
+ [key: string | number | symbol]: any;
2635
+ };
2636
+ } | undefined;
2637
+ task?: {
2638
+ component: vue.Component | vue.VNode | string;
2639
+ props?: {
2640
+ [key: string | number | symbol]: any;
2641
+ };
2642
+ } | undefined;
2643
+ "code-row"?: {
2644
+ component: vue.Component | vue.VNode | string;
2645
+ props?: {
2646
+ [key: string | number | symbol]: any;
2647
+ };
2648
+ } | undefined;
2649
+ code?: {
2650
+ component: vue.Component | vue.VNode | string;
2651
+ props?: {
2652
+ [key: string | number | symbol]: any;
2653
+ };
2654
+ } | undefined;
2655
+ link?: {
2656
+ component: vue.Component | vue.VNode | string;
2657
+ props?: {
2658
+ [key: string | number | symbol]: any;
2659
+ };
2660
+ } | undefined;
2661
+ image?: {
2662
+ component: vue.Component | vue.VNode | string;
2663
+ props?: {
2664
+ [key: string | number | symbol]: any;
2665
+ };
2666
+ } | undefined;
2667
+ table?: {
2668
+ component: vue.Component | vue.VNode | string;
2669
+ props?: {
2670
+ [key: string | number | symbol]: any;
2671
+ };
2672
+ } | undefined;
2673
+ revoke?: {
2674
+ component: vue.Component | vue.VNode | string;
2675
+ props?: {
2676
+ [key: string | number | symbol]: any;
2677
+ };
2678
+ } | undefined;
2679
+ next?: {
2680
+ component: vue.Component | vue.VNode | string;
2681
+ props?: {
2682
+ [key: string | number | symbol]: any;
2683
+ };
2684
+ } | undefined;
2685
+ save?: {
2686
+ component: vue.Component | vue.VNode | string;
2687
+ props?: {
2688
+ [key: string | number | symbol]: any;
2689
+ };
2690
+ } | undefined;
2691
+ prettier?: {
2692
+ component: vue.Component | vue.VNode | string;
2693
+ props?: {
2694
+ [key: string | number | symbol]: any;
2695
+ };
2696
+ } | undefined;
2697
+ minimize?: {
2698
+ component: vue.Component | vue.VNode | string;
2699
+ props?: {
2700
+ [key: string | number | symbol]: any;
2701
+ };
2702
+ } | undefined;
2703
+ maximize?: {
2704
+ component: vue.Component | vue.VNode | string;
2705
+ props?: {
2706
+ [key: string | number | symbol]: any;
2707
+ };
2708
+ } | undefined;
2709
+ "fullscreen-exit"?: {
2710
+ component: vue.Component | vue.VNode | string;
2711
+ props?: {
2712
+ [key: string | number | symbol]: any;
2713
+ };
2714
+ } | undefined;
2715
+ fullscreen?: {
2716
+ component: vue.Component | vue.VNode | string;
2717
+ props?: {
2718
+ [key: string | number | symbol]: any;
2719
+ };
2720
+ } | undefined;
2721
+ "preview-only"?: {
2722
+ component: vue.Component | vue.VNode | string;
2723
+ props?: {
2724
+ [key: string | number | symbol]: any;
2725
+ };
2726
+ } | undefined;
2727
+ preview?: {
2728
+ component: vue.Component | vue.VNode | string;
2729
+ props?: {
2730
+ [key: string | number | symbol]: any;
2731
+ };
2732
+ } | undefined;
2733
+ "preview-html"?: {
2734
+ component: vue.Component | vue.VNode | string;
2735
+ props?: {
2736
+ [key: string | number | symbol]: any;
2737
+ };
2738
+ } | undefined;
2739
+ catalog?: {
2740
+ component: vue.Component | vue.VNode | string;
2741
+ props?: {
2742
+ [key: string | number | symbol]: any;
2743
+ };
2744
+ } | undefined;
2745
+ github?: {
2746
+ component: vue.Component | vue.VNode | string;
2747
+ props?: {
2748
+ [key: string | number | symbol]: any;
2749
+ };
2750
+ } | undefined;
2751
+ mermaid?: {
2752
+ component: vue.Component | vue.VNode | string;
2753
+ props?: {
2754
+ [key: string | number | symbol]: any;
2755
+ };
2756
+ } | undefined;
2757
+ formula?: {
2758
+ component: vue.Component | vue.VNode | string;
2759
+ props?: {
2760
+ [key: string | number | symbol]: any;
2761
+ };
2762
+ } | undefined;
2763
+ close?: {
2764
+ component: vue.Component | vue.VNode | string;
2765
+ props?: {
2766
+ [key: string | number | symbol]: any;
2767
+ };
2768
+ } | undefined;
2769
+ delete?: {
2770
+ component: vue.Component | vue.VNode | string;
2771
+ props?: {
2772
+ [key: string | number | symbol]: any;
2773
+ };
2774
+ } | undefined;
2775
+ upload?: {
2776
+ component: vue.Component | vue.VNode | string;
2777
+ props?: {
2778
+ [key: string | number | symbol]: any;
2779
+ };
2780
+ } | undefined;
2781
+ } & CustomStrIcon;
2782
+ readonly sanitizeMermaid: (h: string) => Promise<string>;
2783
+ readonly codeFoldable: boolean;
2784
+ readonly autoFoldThreshold: number;
2785
+ readonly noEcharts: boolean;
2786
+ readonly onChange: ChangeEvent | undefined;
2787
+ readonly onHtmlChanged: HtmlChangedEvent | undefined;
2788
+ readonly onGetCatalog: GetCatalogEvent | undefined;
2789
+ readonly onRemount: (() => void) | undefined;
2790
+ readonly editorId: string | undefined;
2791
+ readonly id: string | undefined;
2792
+ readonly previewComponent: vue.Component | undefined;
2793
+ }, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, EditorEmits, "onChange" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "onError" | "update:modelValue" | "onBlur" | "onFocus" | "onInput" | "onDrop" | "oninputBoxWidthChange" | "onRemount", vue.PublicProps, Readonly<{
2794
+ readonly language: string;
2795
+ readonly theme: Themes;
2796
+ readonly previewTheme: string;
2797
+ readonly codeTheme: string;
2798
+ readonly modelValue: string;
2799
+ readonly class: string;
2800
+ readonly showCodeRowNumber: boolean;
2801
+ readonly style: string | vue.CSSProperties;
2802
+ readonly mdHeadingId: MdHeadingId;
2803
+ readonly sanitize: (html: string) => string;
2804
+ readonly noMermaid: boolean;
2805
+ readonly noKatex: boolean;
2806
+ readonly formatCopiedText: (text: string) => string;
2807
+ readonly codeStyleReverse: boolean;
2808
+ readonly codeStyleReverseList: string[];
2809
+ readonly noHighlight: boolean;
2810
+ readonly noImgZoomIn: boolean;
2811
+ readonly customIcon: {
2812
+ title?: {
2813
+ component: vue.Component | vue.VNode | string;
2814
+ props?: {
2815
+ [key: string | number | symbol]: any;
2816
+ };
2817
+ } | undefined;
2818
+ bold?: {
2819
+ component: vue.Component | vue.VNode | string;
2820
+ props?: {
2821
+ [key: string | number | symbol]: any;
2822
+ };
2823
+ } | undefined;
2824
+ underline?: {
2825
+ component: vue.Component | vue.VNode | string;
2826
+ props?: {
2827
+ [key: string | number | symbol]: any;
2828
+ };
2829
+ } | undefined;
2830
+ italic?: {
2831
+ component: vue.Component | vue.VNode | string;
2832
+ props?: {
2833
+ [key: string | number | symbol]: any;
2834
+ };
2835
+ } | undefined;
2836
+ "strike-through"?: {
2837
+ component: vue.Component | vue.VNode | string;
2838
+ props?: {
2839
+ [key: string | number | symbol]: any;
2840
+ };
2841
+ } | undefined;
2842
+ sub?: {
2843
+ component: vue.Component | vue.VNode | string;
2844
+ props?: {
2845
+ [key: string | number | symbol]: any;
2846
+ };
2847
+ } | undefined;
2848
+ sup?: {
2849
+ component: vue.Component | vue.VNode | string;
2850
+ props?: {
2851
+ [key: string | number | symbol]: any;
2852
+ };
2853
+ } | undefined;
2854
+ quote?: {
2855
+ component: vue.Component | vue.VNode | string;
2856
+ props?: {
2857
+ [key: string | number | symbol]: any;
2858
+ };
2859
+ } | undefined;
2860
+ "unordered-list"?: {
2861
+ component: vue.Component | vue.VNode | string;
2862
+ props?: {
2863
+ [key: string | number | symbol]: any;
2864
+ };
2865
+ } | undefined;
2866
+ "ordered-list"?: {
2867
+ component: vue.Component | vue.VNode | string;
2868
+ props?: {
2869
+ [key: string | number | symbol]: any;
2870
+ };
2871
+ } | undefined;
2872
+ task?: {
2873
+ component: vue.Component | vue.VNode | string;
2874
+ props?: {
2875
+ [key: string | number | symbol]: any;
2876
+ };
2877
+ } | undefined;
2878
+ "code-row"?: {
2879
+ component: vue.Component | vue.VNode | string;
2880
+ props?: {
2881
+ [key: string | number | symbol]: any;
2882
+ };
2883
+ } | undefined;
2884
+ code?: {
2885
+ component: vue.Component | vue.VNode | string;
2886
+ props?: {
2887
+ [key: string | number | symbol]: any;
2888
+ };
2889
+ } | undefined;
2890
+ link?: {
2891
+ component: vue.Component | vue.VNode | string;
2892
+ props?: {
2893
+ [key: string | number | symbol]: any;
2894
+ };
2895
+ } | undefined;
2896
+ image?: {
2897
+ component: vue.Component | vue.VNode | string;
2898
+ props?: {
2899
+ [key: string | number | symbol]: any;
2900
+ };
2901
+ } | undefined;
2902
+ table?: {
2903
+ component: vue.Component | vue.VNode | string;
2904
+ props?: {
2905
+ [key: string | number | symbol]: any;
2906
+ };
2907
+ } | undefined;
2908
+ revoke?: {
2909
+ component: vue.Component | vue.VNode | string;
2910
+ props?: {
2911
+ [key: string | number | symbol]: any;
2912
+ };
2913
+ } | undefined;
2914
+ next?: {
2915
+ component: vue.Component | vue.VNode | string;
2916
+ props?: {
2917
+ [key: string | number | symbol]: any;
2918
+ };
2919
+ } | undefined;
2920
+ save?: {
2921
+ component: vue.Component | vue.VNode | string;
2922
+ props?: {
2923
+ [key: string | number | symbol]: any;
2924
+ };
2925
+ } | undefined;
2926
+ prettier?: {
2927
+ component: vue.Component | vue.VNode | string;
2928
+ props?: {
2929
+ [key: string | number | symbol]: any;
2930
+ };
2931
+ } | undefined;
2932
+ minimize?: {
2933
+ component: vue.Component | vue.VNode | string;
2934
+ props?: {
2935
+ [key: string | number | symbol]: any;
2936
+ };
2937
+ } | undefined;
2938
+ maximize?: {
2939
+ component: vue.Component | vue.VNode | string;
2940
+ props?: {
2941
+ [key: string | number | symbol]: any;
2942
+ };
2943
+ } | undefined;
2944
+ "fullscreen-exit"?: {
2945
+ component: vue.Component | vue.VNode | string;
2946
+ props?: {
2947
+ [key: string | number | symbol]: any;
2948
+ };
2949
+ } | undefined;
2950
+ fullscreen?: {
2951
+ component: vue.Component | vue.VNode | string;
2952
+ props?: {
2953
+ [key: string | number | symbol]: any;
2954
+ };
2955
+ } | undefined;
2956
+ "preview-only"?: {
2957
+ component: vue.Component | vue.VNode | string;
2958
+ props?: {
2959
+ [key: string | number | symbol]: any;
2960
+ };
2961
+ } | undefined;
2962
+ preview?: {
2963
+ component: vue.Component | vue.VNode | string;
2964
+ props?: {
2965
+ [key: string | number | symbol]: any;
2966
+ };
2967
+ } | undefined;
2968
+ "preview-html"?: {
2969
+ component: vue.Component | vue.VNode | string;
2970
+ props?: {
2971
+ [key: string | number | symbol]: any;
2972
+ };
2973
+ } | undefined;
2974
+ catalog?: {
2975
+ component: vue.Component | vue.VNode | string;
2976
+ props?: {
2977
+ [key: string | number | symbol]: any;
2978
+ };
2979
+ } | undefined;
2980
+ github?: {
2981
+ component: vue.Component | vue.VNode | string;
2982
+ props?: {
2983
+ [key: string | number | symbol]: any;
2984
+ };
2985
+ } | undefined;
2986
+ mermaid?: {
2987
+ component: vue.Component | vue.VNode | string;
2988
+ props?: {
2989
+ [key: string | number | symbol]: any;
2990
+ };
2991
+ } | undefined;
2992
+ formula?: {
2993
+ component: vue.Component | vue.VNode | string;
2994
+ props?: {
2995
+ [key: string | number | symbol]: any;
2996
+ };
2997
+ } | undefined;
2998
+ close?: {
2999
+ component: vue.Component | vue.VNode | string;
3000
+ props?: {
3001
+ [key: string | number | symbol]: any;
3002
+ };
3003
+ } | undefined;
3004
+ delete?: {
3005
+ component: vue.Component | vue.VNode | string;
3006
+ props?: {
3007
+ [key: string | number | symbol]: any;
3008
+ };
3009
+ } | undefined;
3010
+ upload?: {
3011
+ component: vue.Component | vue.VNode | string;
3012
+ props?: {
3013
+ [key: string | number | symbol]: any;
3014
+ };
3015
+ } | undefined;
3016
+ } & CustomStrIcon;
3017
+ readonly sanitizeMermaid: (h: string) => Promise<string>;
3018
+ readonly codeFoldable: boolean;
3019
+ readonly autoFoldThreshold: number;
3020
+ readonly noEcharts: boolean;
3021
+ readonly onChange: ChangeEvent | undefined;
3022
+ readonly onHtmlChanged: HtmlChangedEvent | undefined;
3023
+ readonly onGetCatalog: GetCatalogEvent | undefined;
3024
+ readonly onRemount: (() => void) | undefined;
3025
+ readonly editorId: string | undefined;
3026
+ readonly id: string | undefined;
3027
+ readonly previewComponent: vue.Component | undefined;
3028
+ }> & Readonly<{
3029
+ onOnChange?: ((...args: any[]) => any) | undefined;
3030
+ onOnSave?: ((...args: any[]) => any) | undefined;
3031
+ onOnUploadImg?: ((...args: any[]) => any) | undefined;
3032
+ onOnHtmlChanged?: ((...args: any[]) => any) | undefined;
3033
+ onOnGetCatalog?: ((...args: any[]) => any) | undefined;
3034
+ onOnError?: ((...args: any[]) => any) | undefined;
3035
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
3036
+ onOnBlur?: ((...args: any[]) => any) | undefined;
3037
+ onOnFocus?: ((...args: any[]) => any) | undefined;
3038
+ onOnInput?: ((...args: any[]) => any) | undefined;
3039
+ onOnDrop?: ((...args: any[]) => any) | undefined;
3040
+ onOninputBoxWidthChange?: ((...args: any[]) => any) | undefined;
3041
+ onOnRemount?: ((...args: any[]) => any) | undefined;
3042
+ }>, {
3043
+ language: string;
3044
+ theme: Themes;
3045
+ previewTheme: string;
3046
+ codeTheme: string;
3047
+ onChange: ChangeEvent;
3048
+ onHtmlChanged: HtmlChangedEvent;
3049
+ onGetCatalog: GetCatalogEvent;
3050
+ onRemount: () => void;
3051
+ modelValue: string;
3052
+ class: string;
3053
+ editorId: string;
3054
+ id: string;
3055
+ showCodeRowNumber: boolean;
3056
+ style: string | vue.CSSProperties;
3057
+ mdHeadingId: MdHeadingId;
3058
+ sanitize: (html: string) => string;
3059
+ noMermaid: boolean;
3060
+ noKatex: boolean;
3061
+ formatCopiedText: (text: string) => string;
3062
+ codeStyleReverse: boolean;
3063
+ codeStyleReverseList: string[];
3064
+ noHighlight: boolean;
3065
+ noImgZoomIn: boolean;
3066
+ customIcon: CustomIcon;
3067
+ sanitizeMermaid: (h: string) => Promise<string>;
3068
+ codeFoldable: boolean;
3069
+ autoFoldThreshold: number;
3070
+ noEcharts: boolean;
3071
+ previewComponent: vue.Component;
3072
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
3073
+
3074
+ declare const _default$1: typeof MdPreview & {
3075
+ install: (app: App) => App;
3076
+ };
3077
+
3078
+ interface TocItem extends HeadList {
3079
+ index: number;
3080
+ children?: Array<TocItem>;
3081
+ }
3082
+ declare const MdCatalog: vue.DefineComponent<vue.ExtractPropTypes<{
3083
+ /**
3084
+ * 编辑器的Id,务必与需要绑定的编辑器Id相同
3085
+ */
3086
+ editorId: {
3087
+ type: PropType<string>;
3088
+ default: undefined;
3089
+ };
3090
+ class: {
3091
+ type: StringConstructor;
3092
+ default: string;
3093
+ };
3094
+ mdHeadingId: {
3095
+ type: PropType<MdHeadingId>;
3096
+ default: MdHeadingId;
3097
+ };
3098
+ /**
3099
+ * 指定滚动的容器,选择器需带上对应的符号,默认预览框
3100
+ * 元素必须定位!!!!!!
3101
+ *
3102
+ * 默认:#md-editor-preview-wrapper
3103
+ */
3104
+ scrollElement: {
3105
+ type: PropType<string | HTMLElement>;
3106
+ default: undefined;
3107
+ };
3108
+ theme: {
3109
+ type: PropType<Themes>;
3110
+ default: string;
3111
+ };
3112
+ /**
3113
+ * 高亮标题相对滚动容器顶部偏移量,即距离该值时,高亮当前目录菜单项
3114
+ *
3115
+ * 默认:20px
3116
+ */
3117
+ offsetTop: {
3118
+ type: PropType<number>;
3119
+ default: number;
3120
+ };
3121
+ /**
3122
+ * 滚动区域的固定顶部高度
3123
+ *
3124
+ * 默认:0
3125
+ */
3126
+ scrollElementOffsetTop: {
3127
+ type: PropType<number>;
3128
+ default: number;
3129
+ };
3130
+ onClick: {
3131
+ type: PropType<(e: MouseEvent, t: TocItem) => void>;
3132
+ default: undefined;
3133
+ };
3134
+ onActive: {
3135
+ type: PropType<(heading: HeadList | undefined, activeElement: HTMLDivElement) => void>;
3136
+ default: undefined;
3137
+ };
3138
+ /**
3139
+ * 滚动容器是否在web component中,默认不在
3140
+ *
3141
+ * 在其中的话通过document查询不到
3142
+ */
3143
+ isScrollElementInShadow: {
3144
+ type: PropType<boolean>;
3145
+ default: boolean;
3146
+ };
3147
+ /**
3148
+ * 设置与哪个区域同步,默认与内容区域同步
3149
+ *
3150
+ * >= v5.3.0
3151
+ */
3152
+ syncWith: {
3153
+ type: PropType<"editor" | "preview">;
3154
+ default: string;
3155
+ };
3156
+ /**
3157
+ * 控制最大显示的目录层级
3158
+ */
3159
+ catalogMaxDepth: {
3160
+ type: PropType<number>;
3161
+ default: undefined;
3162
+ };
3163
+ }>, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("onClick" | "onActive")[], "onClick" | "onActive", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
3164
+ /**
3165
+ * 编辑器的Id,务必与需要绑定的编辑器Id相同
3166
+ */
3167
+ editorId: {
3168
+ type: PropType<string>;
3169
+ default: undefined;
3170
+ };
3171
+ class: {
3172
+ type: StringConstructor;
3173
+ default: string;
3174
+ };
3175
+ mdHeadingId: {
3176
+ type: PropType<MdHeadingId>;
3177
+ default: MdHeadingId;
3178
+ };
3179
+ /**
3180
+ * 指定滚动的容器,选择器需带上对应的符号,默认预览框
3181
+ * 元素必须定位!!!!!!
3182
+ *
3183
+ * 默认:#md-editor-preview-wrapper
3184
+ */
3185
+ scrollElement: {
3186
+ type: PropType<string | HTMLElement>;
3187
+ default: undefined;
3188
+ };
3189
+ theme: {
3190
+ type: PropType<Themes>;
3191
+ default: string;
3192
+ };
3193
+ /**
3194
+ * 高亮标题相对滚动容器顶部偏移量,即距离该值时,高亮当前目录菜单项
3195
+ *
3196
+ * 默认:20px
3197
+ */
3198
+ offsetTop: {
3199
+ type: PropType<number>;
3200
+ default: number;
3201
+ };
3202
+ /**
3203
+ * 滚动区域的固定顶部高度
3204
+ *
3205
+ * 默认:0
3206
+ */
3207
+ scrollElementOffsetTop: {
3208
+ type: PropType<number>;
3209
+ default: number;
3210
+ };
3211
+ onClick: {
3212
+ type: PropType<(e: MouseEvent, t: TocItem) => void>;
3213
+ default: undefined;
3214
+ };
3215
+ onActive: {
3216
+ type: PropType<(heading: HeadList | undefined, activeElement: HTMLDivElement) => void>;
3217
+ default: undefined;
3218
+ };
3219
+ /**
3220
+ * 滚动容器是否在web component中,默认不在
3221
+ *
3222
+ * 在其中的话通过document查询不到
3223
+ */
3224
+ isScrollElementInShadow: {
3225
+ type: PropType<boolean>;
3226
+ default: boolean;
3227
+ };
3228
+ /**
3229
+ * 设置与哪个区域同步,默认与内容区域同步
3230
+ *
3231
+ * >= v5.3.0
3232
+ */
3233
+ syncWith: {
3234
+ type: PropType<"editor" | "preview">;
3235
+ default: string;
3236
+ };
3237
+ /**
3238
+ * 控制最大显示的目录层级
3239
+ */
3240
+ catalogMaxDepth: {
3241
+ type: PropType<number>;
3242
+ default: undefined;
3243
+ };
3244
+ }>> & Readonly<{
3245
+ onOnClick?: ((...args: any[]) => any) | undefined;
3246
+ onOnActive?: ((...args: any[]) => any) | undefined;
3247
+ }>, {
3248
+ onClick: (e: MouseEvent, t: TocItem) => void;
3249
+ theme: Themes;
3250
+ catalogMaxDepth: number;
3251
+ class: string;
3252
+ editorId: string;
3253
+ mdHeadingId: MdHeadingId;
3254
+ onActive: (heading: HeadList | undefined, activeElement: HTMLDivElement) => void;
3255
+ scrollElement: string | HTMLElement;
3256
+ offsetTop: number;
3257
+ scrollElementOffsetTop: number;
3258
+ isScrollElementInShadow: boolean;
3259
+ syncWith: "preview" | "editor";
3260
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
3261
+
3262
+ declare const _default: typeof MdCatalog & {
3263
+ install: (app: App) => App;
3264
+ };
3265
+
3266
+ /**
3267
+ * 重写markdown-it-xss,它的作者好像不维护了
3268
+ */
3269
+
3270
+ interface XSSPluginType {
3271
+ xss?: (_xss: typeof xss) => XSS.IFilterXSSOptions | xss.IFilterXSSOptions;
3272
+ /**
3273
+ * 它不会覆盖默认的白名单,而是把默认白名单、内置白名单结合
3274
+ */
3275
+ extendedWhiteList?: xss.IFilterXSSOptions['whiteList'];
3276
+ }
3277
+ declare const XSSPlugin: (md: markdownit, options: XSSPluginType) => void;
3278
+
3279
+ declare const prefix = "md-editor";
3280
+ declare const editorExtensionsAttrs: GlobalConfig['editorExtensionsAttrs'];
3281
+ declare const allToolbar: string[];
3282
+ declare const allFooter: Array<Footers>;
3283
+ declare const config: Config;
3284
+
3285
+ declare const zh_CN: StaticTextDefaultValue;
3286
+ declare const en_US: StaticTextDefaultValue;
3287
+
3288
+ /**
3289
+ * 清空组件带来的副作用,例如
3290
+ * 1. 使用CDN嵌入的链接,为了保证多个组件能够正常使用,组件在卸载时不会主动移除
3291
+ */
3292
+ declare const clearSideEffects: () => void;
3293
+
3294
+ export { _default$8 as DropdownToolbar, _default as MdCatalog, _default$c as MdEditor, _default$4 as MdModal, _default$1 as MdPreview, _default$6 as ModalToolbar, _default$2 as NormalFooterToolbar, _default$a as NormalToolbar, StrIcon, XSSPlugin, allFooter, allToolbar, clearSideEffects, config, editorExtensionsAttrs, en_US, prefix, zh_CN };
3295
+ export type { ChangeEvent, CodeCss, CodeCssAttrs, CodeMirrorExtension, Config, CustomIcon, CustomStrIcon, DOMEventHandlers, EditorContext, EditorEmits, EditorProps, ErrorEvent, ExposeEvent, ExposeParam, ExposePreviewParam, FocusOption, Footers, GetCatalogEvent, GlobalConfig, HeadList, HtmlChangedEvent, InnerError, Insert, InsertContentGenerator, InsertParam, MarkdownItConfigPlugin, MdHeadingId, MdPreviewProps, MermaidTemplate, PreviewThemes, SaveEvent, SettingType, StaticTextDefault, StaticTextDefaultKey, StaticTextDefaultValue, Themes, ToolbarNames, ToolbarTips, UpdateSetting, UploadImgCallBack, UploadImgCallBackParam, UploadImgEvent, XSSPluginType };