Skip to content

Commit

Permalink
feat: custom image dialog parameter (#280)
Browse files Browse the repository at this point in the history
Co-authored-by: Paweł Midur <[email protected]>
  • Loading branch information
pawelmidur and PawelM-DDH authored Jan 5, 2024
1 parent 65df146 commit 36976f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugins/image/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,14 @@ export const imagePlugin = realmPlugin<{
imageAutocompleteSuggestions?: string[]
disableImageResize?: boolean
imagePreviewHandler?: ImagePreviewHandler
ImageDialog?: (() => JSX.Element) | React.FC
}>({
init(realm) {
init(realm, params) {
realm.pubIn({
[addImportVisitor$]: [MdastImageVisitor, MdastHtmlImageVisitor, MdastJsxImageVisitor],
[addLexicalNode$]: ImageNode,
[addExportVisitor$]: LexicalImageVisitor,
[addComposerChild$]: ImageDialog
[addComposerChild$]: params?.ImageDialog || ImageDialog
})
},

Expand Down

0 comments on commit 36976f8

Please sign in to comment.