ronds-metadata 1.1.35 → 1.1.36
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.
@@ -1,12 +1,17 @@
|
|
1
1
|
import 'react-markdown-editor-lite/lib/index.css';
|
2
2
|
import 'github-markdown-css';
|
3
|
+
import { UploadFunc } from 'react-markdown-editor-lite/cjs/share/var';
|
3
4
|
import './index.less';
|
4
5
|
interface IMdEditProps {
|
5
6
|
value: string;
|
6
7
|
width?: number;
|
7
8
|
height?: number;
|
8
9
|
onChange: (txt: string) => void;
|
9
|
-
onImageUpload?:
|
10
|
+
onImageUpload?: UploadFunc;
|
11
|
+
onCustomImageUpload?: (event: any) => Promise<{
|
12
|
+
url: string;
|
13
|
+
text?: string;
|
14
|
+
}>;
|
10
15
|
}
|
11
16
|
declare const MdEdit: (props: IMdEditProps) => JSX.Element;
|
12
17
|
export default MdEdit;
|
package/es/comps/MdEdit/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* @Author: your name
|
3
3
|
* @Date: 2021-12-15 15:29:51
|
4
|
-
* @LastEditTime: 2022-08-
|
4
|
+
* @LastEditTime: 2022-08-30 17:11:16
|
5
5
|
*/
|
6
6
|
import React from 'react';
|
7
7
|
import MdEditor from 'react-markdown-editor-lite';
|
@@ -16,19 +16,17 @@ var MdEdit = function MdEdit(props) {
|
|
16
16
|
width = props.width,
|
17
17
|
height = props.height,
|
18
18
|
onChange = props.onChange,
|
19
|
-
onImageUpload = props.onImageUpload
|
19
|
+
onImageUpload = props.onImageUpload,
|
20
|
+
onCustomImageUpload = props.onCustomImageUpload;
|
20
21
|
|
21
22
|
var onValueChange = function onValueChange(v) {
|
22
23
|
onChange && onChange(v.text);
|
23
24
|
};
|
24
25
|
|
25
|
-
var onMyImageUpload = function onMyImageUpload(file) {
|
26
|
-
onImageUpload && onImageUpload(file);
|
27
|
-
};
|
28
|
-
|
29
26
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MdEditor, {
|
30
27
|
value: value,
|
31
|
-
onImageUpload:
|
28
|
+
onImageUpload: onImageUpload,
|
29
|
+
onCustomImageUpload: onCustomImageUpload,
|
32
30
|
style: {
|
33
31
|
width: "".concat(width, "px"),
|
34
32
|
height: "".concat(height, "px")
|