@mdxeditor/editor 3.32.2 → 3.32.3

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.
@@ -243,7 +243,16 @@ function onDrop(event, editor, imageUploadHandler) {
243
243
  if (cbPayload.length > 0) {
244
244
  if (imageUploadHandler !== null) {
245
245
  event.preventDefault();
246
- Promise.all(cbPayload.map((image) => imageUploadHandler(image.getAsFile()))).then((urls) => {
246
+ Promise.all(
247
+ cbPayload.map((image) => {
248
+ if (image.kind === "string") {
249
+ return new Promise((rs) => {
250
+ image.getAsString(rs);
251
+ });
252
+ }
253
+ return imageUploadHandler(image.getAsFile());
254
+ })
255
+ ).then((urls) => {
247
256
  urls.forEach((url) => {
248
257
  editor.dispatchCommand(INSERT_IMAGE_COMMAND, {
249
258
  src: url,
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "*.css"
12
12
  ],
13
13
  "type": "module",
14
- "version": "3.32.2",
14
+ "version": "3.32.3",
15
15
  "description": "React component for rich text markdown editing",
16
16
  "scripts": {
17
17
  "build": "vite build",