diff --git a/src/bundle/useMarkdownEditor.ts b/src/bundle/useMarkdownEditor.ts index 450a82fa..e2212c38 100644 --- a/src/bundle/useMarkdownEditor.ts +++ b/src/bundle/useMarkdownEditor.ts @@ -34,6 +34,7 @@ export function useMarkdownEditor( const breaks = md.breaks ?? props.breaks; const preset: MarkdownEditorPreset = props.preset ?? 'full'; const renderStorage = new ReactRenderStorage(); + const uploadFile = handlers.uploadFile ?? props.fileUploadHandler; const needToSetDimensionsForUploadedImages = experimental.needToSetDimensionsForUploadedImages ?? props.needToSetDimensionsForUploadedImages; @@ -54,7 +55,7 @@ export function useMarkdownEditor( return true; }, mdBreaks: breaks, - fileUploadHandler: props.fileUploadHandler, + fileUploadHandler: uploadFile, needToSetDimensionsForUploadedImages, }); { @@ -84,7 +85,7 @@ export function useMarkdownEditor( }, handlers: { ...handlers, - uploadFile: handlers.uploadFile ?? props.fileUploadHandler, + uploadFile, }, experimental: { ...experimental,