md-editor-v3 1.4.4 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,72 +1,71 @@
1
1
  # md-editor-v3
2
2
 
3
- vue3 项目下的 Markdown 编辑器,,使用 jsx 语法开发,支持在 tsx 项目使用。采用了替换 class 名称的方式实现暗黑主题切换。
3
+ ![](https://img.shields.io/github/package-json/v/imzbf/md-editor-v3) ![](https://img.shields.io/npm/dm/md-editor-v3) ![](https://img.shields.io/bundlephobia/min/md-editor-v3) ![](https://img.shields.io/github/license/imzbf/md-editor-v3) ![](https://img.shields.io/badge/ssr-%3E1.6.0-brightgreen)
4
4
 
5
- 文档与在线预览:[传送门](https://imzbf.github.io/md-editor-v3)
5
+ English \| [中文](https://github.com/imzbf/md-editor-v3/blob/dev/README-CN.md)
6
6
 
7
- 在线尝试示例:[传送门](https://stackblitz.com/edit/vue-aleajl)
7
+ Markdown editor for vue3, developed by `jsx` and `typescript`.
8
8
 
9
- 同系列`react`版本:[md-editor-rt](https://github.com/imzbf/md-editor-rt)
9
+ - Documentation and demo:[Go](https://imzbf.github.io/md-editor-v3)
10
10
 
11
- ## 功能一览
11
+ - Use it online:[Go](https://codesandbox.io/s/epic-bird-2znqo)
12
12
 
13
- 1. 快捷插入内容工具栏、编辑器浏览器全屏、页面内全屏等;
14
- 2. 内置的白色主题和暗黑主题,支持绑定切换;
15
- 3. 支持快捷键插入内容;
16
- 4. 支持使用 prettier 格式化内容(使用 CDN 方式引入,只支持格式化 md 内容,可在代码内设置关闭);
17
- 5. 支持多语言,支持自行扩展语言;
18
- 6. 支持复制粘贴上传图片,图片裁剪上传;
19
- 7. 支持仅预览模式(不显示编辑器,只显示 md 预览内容,无额外监听)
20
- 8. ...
13
+ - The same series editor for react:[md-editor-rt](https://github.com/imzbf/md-editor-rt)
21
14
 
22
- > 更多功能待后续更新,若有想要的功能未开发,请留言~
15
+ ## Features
23
16
 
24
- ## 预览图
17
+ - Toolbar, screenfull or screenfull in web pages and so on.
18
+ - Themes, Built-in default and dark themes.
19
+ - Shortcut key for editor.
20
+ - Beautify your content by `prettier`(only for markdown content, not the code and other text).
21
+ - Multi-language, build-in Chinese and English(default: Chinese).
22
+ - Upload picture, paste or clip the picture and upload it.
23
+ - Render article directly(no editor,no event listener, only preview content).
24
+ - Preview themes, support `defalut`、`vuepress`、`github` styles(not identical).
25
25
 
26
- 默认模式下:
26
+ > More features are developing, if you have some ideas or find issues, please tell it to me~
27
27
 
28
- ![](https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/6d93b5ac7338479fb7fd0b94ba6e003a~tplv-k3u1fbpfcp-watermark.image)
28
+ ## Preview
29
29
 
30
- 暗黑模式下:
31
-
32
- ![](https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/45d0ddaead1d48b2843ef16e2065a298~tplv-k3u1fbpfcp-watermark.image)
30
+ | Default theme | Dark theme | Preview only |
31
+ | --- | --- | --- |
32
+ | ![](https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/316ecb6e9b3b431aa1a6b0d20d9dabac~tplv-k3u1fbpfcp-watermark.image) | ![](https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/611acc4227084ba19875b4b578a01e07~tplv-k3u1fbpfcp-watermark.image) | ![](https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/1664c4a5404641c4a1080d64bc6c5831~tplv-k3u1fbpfcp-watermark.image) |
33
33
 
34
- ## apis
34
+ ## Apis
35
35
 
36
- ### props
36
+ ### Props
37
37
 
38
- | 名称 | 类型 | 默认值 | 响应式 | 说明 |
38
+ | name | type | default | responsive | description |
39
39
  | --- | --- | --- | --- | --- |
40
- | modelValue | String | '' | √ | md 编辑内容,vue 模板支持双向绑定(v-model="value") |
41
- | theme | 'light' \| 'dark' | 'light' | √ | 主题切换 |
42
- | editorClass | String | '' | √ | 编辑器最外层样式 |
43
- | hljs | Object | null | x | 项目中使用到了 highlight,可将实例直接传递,生产环境则不会请求 CDN,需要手动导入支持的高亮代码样式 |
44
- | highlightJs | String | [highlight.js@11.2.0](https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.2.0/build/highlight.min.js) | x | highlightJs CDN |
45
- | highlightCss | String | [atom-one-dark@11.2.0](https://cdn.jsdelivr.net/npm/highlight.js@11.2.0/styles/atom-one-dark.css) | x | 预览高亮代码样式 |
46
- | historyLength | Number | 10 | x | 最大记录操作数(太大会占用内存) |
47
- | pageFullScreen | Boolean | false | x | 浏览器内全屏 |
48
- | preview | Boolean | true | x | 预览模式 |
49
- | htmlPreview | Boolean | false | x | html 预览 |
50
- | previewOnly<sup>v1.3.0</sup> | Boolean | false | x | 仅预览模式,不显示 bar 和编辑框,_不支持响应式,仅能初始设置一次_ |
51
- | language | String | 'zh-CN' | √ | 内置中英文('zh-CN','en-US'),可自行扩展其他语言,同时可覆盖内置的中英文 |
52
- | languageUserDefined | Array | [{key: StaticTextDefaultValue}] | √ | 通过这里扩展语言,修改 language 值为扩展 key 即可,类型申明可手动导入 |
53
- | toolbars | Array | [all] | √ | 选择性展示工具栏,可选内容如下<sup>[toolbars]<sup> |
54
- | toolbarsExclude<sup>v1.1.4</sup> | Array | [] | √ | 选择性不展示工具栏,内容同`toolbars` |
55
- | prettier | Boolean | true | x | 是否启用 prettier 优化 md 内容 |
40
+ | modelValue | String | '' | √ | Markdown content,use `v-model` in vue template |
41
+ | theme | 'light' \| 'dark' | 'light' | √ | Change editor theme |
42
+ | editorClass | String | '' | √ | |
43
+ | hljs | Object | null | x | `Highlight` instance, editor will not insert script of it, but you need to import `highlight` code style by yourself |
44
+ | highlightJs | String | [highlight.js@11.2.0](https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.2.0/build/highlight.min.js) | x | HighlightJs url |
45
+ | highlightCss | String | [atom-one-dark@11.2.0](https://cdn.jsdelivr.net/npm/highlight.js@11.2.0/styles/atom-one-dark.css) | x | `Highlight` code style |
46
+ | historyLength | Number | 10 | x | The max length of history(if it is too big, editor will use more `RAM`) |
47
+ | pageFullScreen | Boolean | false | x | Screenfull in web page |
48
+ | preview | Boolean | true | x | Preview content in editor |
49
+ | htmlPreview | Boolean | false | x | Preview html in editor |
50
+ | previewOnly<sup>v1.3.0</sup> | Boolean | false | x | Only render article content, no toolbar, no edit area |
51
+ | language | String | 'zh-CN' | √ | Build-in language('zh-CN','en-US') |
52
+ | languageUserDefined<sup>v1.5.0 changed</sup> | Object | {key: StaticTextDefaultValue} | √ | Expand language,update `language` api to your key |
53
+ | toolbars | Array | [toolbars] | √ | Show some item of toolbars,all keys<sup>see `toolbars` below<sup> |
54
+ | toolbarsExclude<sup>v1.1.4</sup> | Array | [] | √ | Don't show some item of toolbars,all keys`toolbars` |
55
+ | prettier | Boolean | true | x | Use prettier to beautify content or not |
56
56
  | prettierCDN | String | [standalone@2.4.0](https://cdn.jsdelivr.net/npm/prettier@2.4.0/standalone.js) | x | |
57
57
  | prettierMDCDN | String | [parser-markdown@2.4.0](https://cdn.jsdelivr.net/npm/prettier@2.4.0/parser-markdown.js) | x | |
58
- | editorName<sup>v1.3.2delete</sup> | String | 'editor' | x | 当在同一页面放置了多个编辑器,最好提供该属性以区别某些带有 ID 的内容,v1.3.2 后版本编辑器自动生成唯一 ID,不再需要手动设置 |
59
- | cropperCss<sup>v1.2.0</sup> | String | [cropper.min.css@1.5.12](https://cdn.jsdelivr.net/npm/cropperjs@1.5.12/dist/cropper.min.css) | x | cropper css url |
60
- | cropperJs<sup>v1.2.0</sup> | String | [cropper.min.js@1.5.12](https://cdn.jsdelivr.net/npm/cropperjs@1.5.12/dist/cropper.min.js) | x | cropper js url |
61
- | iconfontJs<sup>v1.3.2</sup> | String | [iconfont](https://at.alicdn.com/t/font_2605852_khjf435c7th.js) | x | 矢量图标链接,无外网时,下载 js 到内网,提供链接 |
62
- | editorId<sup>v1.4.0</sup> | String | random | x | 编辑器唯一标识,非必须项,用于后续支持`ssr`时,防止产生服务端与客户端渲染内容不一致错误提示 |
63
- | tabWidth<sup>v1.4.0<sup> | Number | 2 | x | 编辑器 TAB 键位等于空格数 |
64
- | showCodeRowNumber<sup>[v1.4.3](https://github.com/imzbf/md-editor-v3/releases/tag/v1.4.3)</sup> | Boolean | false | x | 代码块显示行号 |
65
- | screenfull<sup>[v1.4.3](https://github.com/imzbf/md-editor-v3/releases/tag/v1.4.3)</sup> | Object | null | x | 全屏插件实例,项目中有使用可以将其传入,这样编辑器不再会使用 cdn 引入 |
66
- | screenfullJs<sup>[v1.4.3](https://github.com/imzbf/md-editor-v3/releases/tag/v1.4.3)</sup> | String | [5.1.0](https://cdn.jsdelivr.net/npm/screenfull@5.1.0/dist/screenfull.js) | x | cdn 链接 |
67
- | previewTheme<sup>[v1.4.3](https://github.com/imzbf/md-editor-v3/releases/tag/v1.4.3)</sup> | 'default' \| 'github' \| 'vuepress' | 'default' | √ | 预览内容主题 |
68
-
69
- > 响应式=x,该属性只支持设置,不支持响应式更新~
58
+ | cropperCss<sup>v1.2.0</sup> | String | [cropper.min.css@1.5.12](https://cdn.jsdelivr.net/npm/cropperjs@1.5.12/dist/cropper.min.css) | x | Cropper css url |
59
+ | cropperJs<sup>v1.2.0</sup> | String | [cropper.min.js@1.5.12](https://cdn.jsdelivr.net/npm/cropperjs@1.5.12/dist/cropper.min.js) | x | Cropper js url |
60
+ | iconfontJs<sup>v1.3.2</sup> | String | [iconfont](https://at.alicdn.com/t/font_2605852_khjf435c7th.js) | x | Icon url |
61
+ | editorId<sup>v1.4.0</sup> | String | random | x | Editor id, also the html id, it is used when there are two or more editor and server render in the future |
62
+ | tabWidth<sup>v1.4.0<sup> | Number | 2 | x | One tab eq some space |
63
+ | showCodeRowNumber<sup>v1.4.3</sup> | Boolean | false | x | Show row number for code block or not |
64
+ | screenfull<sup>v1.4.3</sup> | Object | null | x | Screenfull instance, editor will not insert script of it |
65
+ | screenfullJs<sup><v1.4.3</sup> | String | [screenfull@5.1.0](https://cdn.jsdelivr.net/npm/screenfull@5.1.0/dist/screenfull.js) | x | Screenfull js url |
66
+ | previewTheme<sup>v1.4.3</sup> | 'default' \| 'github' \| 'vuepress' | 'default' | √ | Preview themes |
67
+
68
+ > If responsive is `x`, you can set it's default value once.
70
69
 
71
70
  [toolbars]
72
71
 
@@ -75,6 +74,7 @@ vue3 项目下的 Markdown 编辑器,,使用 jsx 语法开发,支持在 ts
75
74
  'bold',
76
75
  'underline',
77
76
  'italic',
77
+ '-',
78
78
  'strikeThrough',
79
79
  'title',
80
80
  'sub',
@@ -82,14 +82,17 @@ vue3 项目下的 Markdown 编辑器,,使用 jsx 语法开发,支持在 ts
82
82
  'quote',
83
83
  'unorderedList',
84
84
  'orderedList',
85
+ '-',
85
86
  'codeRow',
86
87
  'code',
87
88
  'link',
88
89
  'image',
89
90
  'table',
91
+ '-',
90
92
  'revoke',
91
93
  'next',
92
94
  'save',
95
+ '=',
93
96
  'pageFullscreen',
94
97
  'fullscreen',
95
98
  'preview',
@@ -98,15 +101,17 @@ vue3 项目下的 Markdown 编辑器,,使用 jsx 语法开发,支持在 ts
98
101
  ];
99
102
  ```
100
103
 
101
- 自定义语言,需要替换的内容如下(某些字段若不主动提供,可能会造成页面不美观):
104
+ > after v1.6.0, You can sort the toolbar as you like, split tools by `'-'`, the left and right toolbars are divided by `'='`!
105
+
106
+ Expand language,you need to replace all the content here:
102
107
 
103
108
  [StaticTextDefaultValue]
104
109
 
105
110
  ```ts
106
111
  export interface StaticTextDefaultValue {
107
- // 工具栏hover title提示
112
+ // Toolbar hover tips(html title)
108
113
  toolbarTips?: ToolbarTips;
109
- // 标题下拉框内容
114
+ // h1-h6 dropdown menu item
110
115
  titleItem?: {
111
116
  h1?: string;
112
117
  h2?: string;
@@ -115,7 +120,13 @@ export interface StaticTextDefaultValue {
115
120
  h5?: string;
116
121
  h6?: string;
117
122
  };
118
- // 添加链接或图片时弹窗提示
123
+ // v1.6.0
124
+ imgTitleItem?: {
125
+ link: string;
126
+ upload: string;
127
+ clip2upload: string;
128
+ };
129
+ // The modal tips of add link or upload picture
119
130
  linkModalTips?: {
120
131
  title?: string;
121
132
  descLable?: string;
@@ -123,14 +134,13 @@ export interface StaticTextDefaultValue {
123
134
  urlLable?: string;
124
135
  UrlLablePlaceHolder?: string;
125
136
  buttonOK?: string;
126
- buttonUpload?: string;
127
137
  };
128
- // 裁剪图片弹窗提示,v1.2.0
138
+ // The modal tips of clip the picture,v1.2.0
129
139
  clipModalTips?: {
130
140
  title?: string;
131
141
  buttonUpload?: string;
132
142
  };
133
- // 预览代码中复制代码提示,v1.1.4
143
+ // Copy code tips,v1.1.4
134
144
  copyCode?: {
135
145
  text?: string;
136
146
  tips?: string;
@@ -138,50 +148,49 @@ export interface StaticTextDefaultValue {
138
148
  }
139
149
  ```
140
150
 
141
- ### 事件绑定
151
+ ### Event
142
152
 
143
- | 名称 | 入参 | 说明 |
153
+ | name | params | description |
144
154
  | --- | --- | --- |
145
- | onChange | v:String | 内容变化事件(当前与`textare`的`oninput`事件绑定,每输入一个单字即会触发) |
146
- | onSave | v:String | 保存事件,快捷键与保存按钮均会触发 |
147
- | onUploadImg | files:FileList, callback:Function | 上传图片事件,弹窗会等待上传结果,务必将上传后的 urls 作为 callback 入参回传 |
148
- | onHtmlChanged | h:String | html 变化回调事件,用于获取预览 html 代码 |
149
- | onGetCatalog<sup>v1.4.0</sup> | list: HeadList[] | 动态获取`markdown`目录 |
155
+ | onChange | v:String | Content changed event(bind to `oninput` of `textarea`) |
156
+ | onSave | v:String | Save Content event,`ctrl+s`and click button will trigger |
157
+ | onUploadImg | files:FileList, callback:Function | Upload picture event,when picture is uploading the modal will not close,please provide right urls to the callback function |
158
+ | onHtmlChanged | h:String | Compile markdown successful event,you can use it to get the html code |
159
+ | onGetCatalog<sup>v1.4.0</sup> | list: HeadList[] | Get catalogue of article |
160
+ | markedHeading<sup>[v1.6.0](https://github.com/imzbf/md-editor-v3/releases/tag/v1.6.0)</sup> | text: string,level: 1-6,raw: string, slugger: Slugger | `marked` head renderer methods |
150
161
 
151
- ### 快捷键
162
+ ### Shortcut key
152
163
 
153
- 主要以`CTRL`搭配对应功能英文单词首字母,冲突项添加`SHIFT`,再冲突替换为`ALT`。
154
-
155
- | 键位 | 功能 | 说明 | 版本标记 |
164
+ | key | function | description | support |
156
165
  | --- | --- | --- | --- |
157
- | TAB | 空格 | 通过`tabWidth`属性预设 TAB 键位新增空格长度,默认 2,支持多行 | v1.4.0 |
158
- | SHIFT + TAB | 取消空格 | 同上,一次取消两个空格,支持多行 | v1.4.0 |
159
- | CTRL + C | 复制 | 选中时复制选中内容,未选中时复制当前行内容 | v1.4.0 |
160
- | CTRL + X | 剪切 | 选中时剪切选中内容,未选中时剪切当前行 | v1.4.0 |
161
- | CTRL + D | 删除 | 选中时删除选中内容,未选中时删除当前行 | v1.4.0 |
162
- | CTRL + S | 保存 | 触发编辑器的`onSave`回调 | v1.0.0 |
163
- | CTRL + B | 加粗 | `**加粗**` | v1.0.0 |
164
- | CTRL + U | 下划线 | `<u>下划线</u>` | v1.0.0 |
165
- | CTRL + I | 斜体 | `*斜体*` | v1.0.0 |
166
- | CTRL + 1-6 | 1-6 级标题 | `# 标题` | v1.0.0 |
167
- | CTRL + ↑ | 上角标 | `<sup>上角标</sup>` | v1.0.0 |
168
- | CTRL + ↓ | 下角标 | `<sub>下角标</sub>` | v1.0.0 |
169
- | CTRL + Q | 引用 | `> 引用` | v1.0.0 |
170
- | CTRL + O | 有序列表 | `1. 有序列表` | v1.0.0 |
171
- | CTRL + L | 链接 | `[链接](https://imbf.cc)` | v1.0.0 |
172
- | CTRL + Z | 撤回 | 触发编辑器内内容撤回,与系统无关 | v1.0.0 |
173
- | CTRL + SHIFT + S | 删除线 | `~删除线~` | v1.0.0 |
174
- | CTRL + SHIFT + U | 无序列表 | `- 无序列表` | v1.0.0 |
175
- | CTRL + SHIFT + C | 块级代码 | 多行代码块 | v1.0.0 |
176
- | CTRL + SHIFT + I | 图片链接 | `![图片](https://imbf.cc)` | v1.0.0 |
177
- | CTRL + SHIFT + Z | 前进一步 | 触发编辑器内内容前进,与系统无关 | v1.0.0 |
178
- | CTRL + SHIFT + F | 美化内容 | | v1.0.0 |
179
- | CTRL + ALT + C | 行内代码 | 行内代码块 | v1.0.0 |
180
- | CTRL + SHIFT + ALT + T | 表格 | `\|表格\|` | v1.4.0 |
181
-
182
- ## 演示
183
-
184
- ### jsx 语法项目
166
+ | TAB | insert space | Insert space, the length eq `tabWidth`, default: 2, support multiline | v1.4.0 |
167
+ | SHIFT + TAB | delete space, setting is the same as Tab | | v1.4.0 |
168
+ | CTRL + C | copy | When selected, copy the selected content. When not selected, copy the content of the current line | v1.4.0 |
169
+ | CTRL + X | shear | When selected, cut the selected content. When not selected, cut the current line | v1.4.0 |
170
+ | CTRL + D | delete | When selected, delete the selected content. When not selected, delete the current line | v1.4.0 |
171
+ | CTRL + S | save | Trigger `onSave` event | v1.0.0 |
172
+ | CTRL + B | bold text | `**bold**` | v1.0.0 |
173
+ | CTRL + U | underline | `<u>underline</u>` | v1.0.0 |
174
+ | CTRL + I | italic | `*italic*` | v1.0.0 |
175
+ | CTRL + 1-6 | h1-h6 | `# title` | v1.0.0 |
176
+ | CTRL + ↑ | superscript | `<sup>superscript</sup>` | v1.0.0 |
177
+ | CTRL + ↓ | subscript | `<sub>subscript</sub>` | v1.0.0 |
178
+ | CTRL + Q | quote | `> quote` | v1.0.0 |
179
+ | CTRL + O | ordered list | `1. ordered list` | v1.0.0 |
180
+ | CTRL + L | link | `[link](https://github.com/imzbf/md-editor-v3)` | v1.0.0 |
181
+ | CTRL + Z | withdraw | Withdraw history in editor, not the function of system | v1.0.0 |
182
+ | CTRL + SHIFT + S | line-through | `~line-through~` | v1.0.0 |
183
+ | CTRL + SHIFT + U | unordered list | `- unordered list` | v1.0.0 |
184
+ | CTRL + SHIFT + C | code block | | v1.0.0 |
185
+ | CTRL + SHIFT + I | picture | `![picture](https://imbf.cc)` | v1.0.0 |
186
+ | CTRL + SHIFT + Z | forward | Forward history in editor, not the function of system | v1.0.0 |
187
+ | CTRL + SHIFT + F | Beautify | | v1.0.0 |
188
+ | CTRL + ALT + C | code row | | v1.0.0 |
189
+ | CTRL + SHIFT + ALT + T | table | `\|table\|` | v1.4.0 |
190
+
191
+ ## Simple demo
192
+
193
+ ### Jsx module
185
194
 
186
195
  ```js
187
196
  import { defineComponent, reactive } from 'vue';
@@ -202,7 +211,7 @@ export default defineComponent({
202
211
  });
203
212
  ```
204
213
 
205
- ### vue 模板项目
214
+ ### Vue template
206
215
 
207
216
  ```js
208
217
  <template>
@@ -219,7 +228,7 @@ export default defineComponent({
219
228
  components: { Editor },
220
229
  data() {
221
230
  return {
222
- text: '默认值'
231
+ text: '# md-editor-v3'
223
232
  };
224
233
  }
225
234
  });
@@ -227,11 +236,9 @@ export default defineComponent({
227
236
 
228
237
  ```
229
238
 
230
- ### 上传图片
231
-
232
- 默认可以选择多张图片,支持粘贴板上传图片。
239
+ ### Upload picture
233
240
 
234
- > 注意:粘贴板上传时,如果是网页上的 gif 图,无法正确上传为 gif 格式!
241
+ > Tips:When you paste and upload GIF,it will upload a static picture. So you should upload it by file system!
235
242
 
236
243
  ```js
237
244
  async onUploadImg(files: FileList, callback: (urls: string[]) => void) {
@@ -256,3 +263,11 @@ async onUploadImg(files: FileList, callback: (urls: string[]) => void) {
256
263
  callback(res.map((item: any) => item.data.url));
257
264
  }
258
265
  ```
266
+
267
+ ## Support
268
+
269
+ > Refund can be made through the contact information above(Please do not operate maliciously).
270
+
271
+ | Alipay | WeChat |
272
+ | --- | --- |
273
+ | ![Alipay](https://art-1252753142.cos.ap-chengdu.myqcloud.com/2021/10061034374527224217786475887.jpeg) | ![WeChat](https://art-1252753142.cos.ap-chengdu.myqcloud.com/2021/10061034518598350079764474265.jpeg) |
@@ -33,6 +33,8 @@ export interface ToolbarTips {
33
33
  preview?: string;
34
34
  htmlPreview?: string;
35
35
  github?: string;
36
+ '-'?: string;
37
+ '='?: string;
36
38
  }
37
39
  export interface StaticTextDefaultValue {
38
40
  toolbarTips?: ToolbarTips;
@@ -44,6 +46,11 @@ export interface StaticTextDefaultValue {
44
46
  h5?: string;
45
47
  h6?: string;
46
48
  };
49
+ imgTitleItem?: {
50
+ link: string;
51
+ upload: string;
52
+ clip2upload: string;
53
+ };
47
54
  linkModalTips?: {
48
55
  title?: string;
49
56
  descLable?: string;
@@ -51,8 +58,6 @@ export interface StaticTextDefaultValue {
51
58
  urlLable?: string;
52
59
  UrlLablePlaceHolder?: string;
53
60
  buttonOK?: string;
54
- buttonUpload?: string;
55
- buttonUploadClip?: string;
56
61
  };
57
62
  clipModalTips?: {
58
63
  title?: string;
@@ -81,6 +86,14 @@ export interface HeadList {
81
86
  level: 1 | 2 | 3 | 4 | 5 | 6;
82
87
  }
83
88
  export declare type PreviewThemes = 'default' | 'github' | 'vuepress';
89
+ export declare type MarkedHeading = (text: string, level: 1 | 2 | 3 | 4 | 5 | 6, raw: string, slugger: {
90
+ seen: {
91
+ [slugValue: string]: number;
92
+ };
93
+ slug(value: string, options?: {
94
+ dryrun: boolean;
95
+ }): string;
96
+ }) => string;
84
97
  declare const _default: import("vue").DefineComponent<{
85
98
  modelValue: {
86
99
  type: PropType<string>;
@@ -142,8 +155,8 @@ declare const _default: import("vue").DefineComponent<{
142
155
  languageUserDefined: {
143
156
  type: PropType<{
144
157
  [key: string]: StaticTextDefaultValue;
145
- }[]>;
146
- default: () => never[];
158
+ }>;
159
+ default: () => {};
147
160
  };
148
161
  toolbars: {
149
162
  type: PropType<(keyof ToolbarTips)[]>;
@@ -211,6 +224,10 @@ declare const _default: import("vue").DefineComponent<{
211
224
  type: PropType<PreviewThemes>;
212
225
  default: string;
213
226
  };
227
+ markedHeading: {
228
+ type: PropType<MarkedHeading>;
229
+ default: (text: string, level: string) => string;
230
+ };
214
231
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
215
232
  modelValue?: unknown;
216
233
  theme?: unknown;
@@ -245,73 +262,76 @@ declare const _default: import("vue").DefineComponent<{
245
262
  screenfull?: unknown;
246
263
  screenfullJs?: unknown;
247
264
  previewTheme?: unknown;
265
+ markedHeading?: unknown;
248
266
  } & {
267
+ editorId: string;
249
268
  prettier: boolean;
250
269
  preview: boolean;
251
270
  htmlPreview: boolean;
252
- tabWidth: number;
253
- editorId: string;
254
271
  previewOnly: boolean;
272
+ tabWidth: number;
255
273
  showCodeRowNumber: boolean;
256
274
  Cropper: Function;
257
275
  historyLength: number;
258
276
  previewTheme: PreviewThemes;
259
- screenfull: Record<string, any>;
260
- pageFullScreen: boolean;
261
- toolbars: (keyof ToolbarTips)[];
262
- toolbarsExclude: (keyof ToolbarTips)[];
263
- screenfullJs: string;
264
- hljs: Record<string, any>;
265
277
  modelValue: string;
266
278
  theme: "dark" | "light";
267
279
  editorClass: string;
280
+ hljs: Record<string, any>;
268
281
  highlightJs: string;
269
282
  highlightCss: string;
283
+ pageFullScreen: boolean;
270
284
  language: string;
271
285
  languageUserDefined: {
272
286
  [key: string]: StaticTextDefaultValue;
273
- }[];
287
+ };
288
+ toolbars: (keyof ToolbarTips)[];
289
+ toolbarsExclude: (keyof ToolbarTips)[];
274
290
  prettierCDN: string;
275
291
  prettierMDCDN: string;
276
292
  cropperCss: string;
277
293
  cropperJs: string;
278
294
  iconfontJs: string;
295
+ screenfull: Record<string, any>;
296
+ screenfullJs: string;
297
+ markedHeading: MarkedHeading;
279
298
  } & {
280
299
  onSave?: ((v: string) => void) | undefined;
281
300
  onChange?: ((v: string) => void) | undefined;
301
+ onUploadImg?: ((files: FileList, callBack: (urls: string[]) => void) => void) | undefined;
282
302
  onHtmlChanged?: ((h: string) => void) | undefined;
283
303
  onGetCatalog?: ((list: HeadList[]) => void) | undefined;
284
- onUploadImg?: ((files: FileList, callBack: (urls: string[]) => void) => void) | undefined;
285
304
  }>, {
305
+ editorId: string;
286
306
  prettier: boolean;
287
307
  preview: boolean;
288
308
  htmlPreview: boolean;
289
- tabWidth: number;
290
- editorId: string;
291
309
  previewOnly: boolean;
310
+ tabWidth: number;
292
311
  showCodeRowNumber: boolean;
293
312
  Cropper: Function;
294
313
  historyLength: number;
295
314
  previewTheme: PreviewThemes;
296
- screenfull: Record<string, any>;
297
- pageFullScreen: boolean;
298
- toolbars: (keyof ToolbarTips)[];
299
- toolbarsExclude: (keyof ToolbarTips)[];
300
- screenfullJs: string;
301
- hljs: Record<string, any>;
302
315
  modelValue: string;
303
316
  theme: "dark" | "light";
304
317
  editorClass: string;
318
+ hljs: Record<string, any>;
305
319
  highlightJs: string;
306
320
  highlightCss: string;
321
+ pageFullScreen: boolean;
307
322
  language: string;
308
323
  languageUserDefined: {
309
324
  [key: string]: StaticTextDefaultValue;
310
- }[];
325
+ };
326
+ toolbars: (keyof ToolbarTips)[];
327
+ toolbarsExclude: (keyof ToolbarTips)[];
311
328
  prettierCDN: string;
312
329
  prettierMDCDN: string;
313
330
  cropperCss: string;
314
331
  cropperJs: string;
315
332
  iconfontJs: string;
333
+ screenfull: Record<string, any>;
334
+ screenfullJs: string;
335
+ markedHeading: MarkedHeading;
316
336
  }>;
317
337
  export default _default;