md-editor-rt
Advanced tools
Comparing version 1.6.11 to 1.6.12
@@ -127,3 +127,3 @@ import { CSSProperties, ReactElement } from 'react'; | ||
onSave?: (v: string) => void; | ||
onUploadImg?: (files: FileList, callBack: (urls: string[]) => void) => void; | ||
onUploadImg?: (files: Array<File>, callBack: (urls: string[]) => void) => void; | ||
pageFullScreen: boolean; | ||
@@ -130,0 +130,0 @@ preview: boolean; |
{ | ||
"name": "md-editor-rt", | ||
"version": "1.6.11", | ||
"version": "1.6.12", | ||
"keywords": [ | ||
@@ -5,0 +5,0 @@ "react", |
@@ -223,3 +223,3 @@ # md-editor-rt | ||
| onSave | (v: string) => void | Save Content event, `ctrl+s`and click button will trigger | | ||
| onUploadImg | (files: FileList, callback: function) => void | Upload picture event, when picture is uploading the modal will not close, please provide right urls to the callback function | | ||
| onUploadImg | (files: Array<File>, callback: function) => void | Upload picture event, when picture is uploading the modal will not close, please provide right urls to the callback function | | ||
| onHtmlChanged | (h: string) => void | Compile markdown successful event, you can use it to get the html code | | ||
@@ -323,5 +323,5 @@ | onGetCatalog | (list: HeadList[]) => void | Get catalogue of article | | ||
```js | ||
async onUploadImg(files: FileList, callback: (urls: string[]) => void) { | ||
async onUploadImg(files: Array<File>, callback: (urls: string[]) => void) { | ||
const res = await Promise.all( | ||
Array.from(files).map((file) => { | ||
files.map((file) => { | ||
return new Promise((rev, rej) => { | ||
@@ -328,0 +328,0 @@ const form = new FormData(); |
Sorry, the diff of this file is too big to display
239269