cherry-markdown 0.5.16 → 0.5.17
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/CHANGELOG.md +33 -26
- package/dist/cherry-markdown.core.js +1 -1
- package/dist/cherry-markdown.engine.core.js +1 -1
- package/dist/cherry-markdown.esm.js +1 -1
- package/dist/cherry-markdown.js +4 -2
- package/dist/cherry-markdown.js.map +1 -1
- package/dist/cherry-markdown.min.js +1 -1
- package/dist/fonts/ch-icon.eot +0 -0
- package/dist/fonts/ch-icon.ttf +0 -0
- package/dist/fonts/ch-icon.woff +0 -0
- package/dist/fonts/ch-icon.woff2 +0 -0
- package/dist/types/toolbars/hooks/Insert.d.ts +2 -1
- package/package.json +1 -1
- package/src/toolbars/hooks/Insert.js +3 -2
package/dist/fonts/ch-icon.eot
CHANGED
|
Binary file
|
package/dist/fonts/ch-icon.ttf
CHANGED
|
Binary file
|
package/dist/fonts/ch-icon.woff
CHANGED
|
Binary file
|
package/dist/fonts/ch-icon.woff2
CHANGED
|
Binary file
|
|
@@ -7,8 +7,9 @@ export default class Insert extends MenuBase {
|
|
|
7
7
|
/**
|
|
8
8
|
* 上传文件的逻辑
|
|
9
9
|
* @param {string} type 上传文件的类型
|
|
10
|
+
* @param {string} [_accept] TODO: 限定可选择的文件类型,接收 mime type 或后缀名字符串(以逗号分隔)
|
|
10
11
|
*/
|
|
11
|
-
handleUpload(type?: string): void;
|
|
12
|
+
handleUpload(type?: string, _accept?: string): void;
|
|
12
13
|
/**
|
|
13
14
|
* 解析快捷键
|
|
14
15
|
* @param {string} shortcutKey 快捷键
|
package/package.json
CHANGED
|
@@ -78,11 +78,12 @@ export default class Insert extends MenuBase {
|
|
|
78
78
|
/**
|
|
79
79
|
* 上传文件的逻辑
|
|
80
80
|
* @param {string} type 上传文件的类型
|
|
81
|
+
* @param {string} [_accept] TODO: 限定可选择的文件类型,接收 mime type 或后缀名字符串(以逗号分隔)
|
|
81
82
|
*/
|
|
82
|
-
handleUpload(type = 'image') {
|
|
83
|
+
handleUpload(type = 'image', _accept) {
|
|
83
84
|
// type为上传文件类型 image|video|audio|pdf|word
|
|
84
85
|
const input = document.createElement('input');
|
|
85
|
-
input.type =
|
|
86
|
+
input.type = 'file';
|
|
86
87
|
input.id = 'fileUpload';
|
|
87
88
|
input.value = '';
|
|
88
89
|
input.style.display = 'none';
|