Skip to content

Commit

Permalink
fix: pasting images works
Browse files Browse the repository at this point in the history
Fixes #281
  • Loading branch information
petyosi committed Jan 13, 2024
1 parent 73a87f3 commit fa71fc0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/plugins/image/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export const imageDialogState$ = Cell<InactiveImageDialogState | NewImageDialogS

r.pub(createActiveEditorSubscription$, (editor) => {
const theUploadHandler = r.getValue(imageUploadHandler$)
console.log('theUploadHandler', theUploadHandler)
return mergeRegister(
editor?.registerCommand<InsertImagePayload>(
INSERT_IMAGE_COMMAND,
Expand Down Expand Up @@ -286,7 +287,11 @@ export const imagePlugin = realmPlugin<{
[addImportVisitor$]: [MdastImageVisitor, MdastHtmlImageVisitor, MdastJsxImageVisitor],
[addLexicalNode$]: ImageNode,
[addExportVisitor$]: LexicalImageVisitor,
[addComposerChild$]: params?.ImageDialog || ImageDialog
[addComposerChild$]: params?.ImageDialog || ImageDialog,
[imageUploadHandler$]: params?.imageUploadHandler || null,
[imageAutocompleteSuggestions$]: params?.imageAutocompleteSuggestions || [],
[disableImageResize$]: Boolean(params?.disableImageResize),
[imagePreviewHandler$]: params?.imagePreviewHandler || null
})
},

Expand Down

0 comments on commit fa71fc0

Please sign in to comment.