Skip to content
1 change: 1 addition & 0 deletions src/MUIRichTextEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,7 @@ const MUIRichTextEditor: RefForwardingComponent<TMUIRichTextEditorRef, IMUIRichT
data={state.urlData}
anchor={state.anchorUrlPopover}
onConfirm={handleConfirmPrompt}
onCancel={dismissPopover}
isMedia={state.urlIsMedia}
/>
: null}
Expand Down
2 changes: 2 additions & 0 deletions src/components/UrlPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ interface IUrlPopoverStateProps extends WithStyles<typeof styles> {
data?: TUrlData
isMedia?: boolean
onConfirm: (isMedia?: boolean, ...args: any) => void
onCancel: () => void
}

const styles = ({ spacing }: Theme) => createStyles({
Expand Down Expand Up @@ -68,6 +69,7 @@ const UrlPopover: FunctionComponent<IUrlPopoverStateProps> = (props) => {
return (
<Popover
open={props.anchor !== undefined}
onClose={props.onCancel}
anchorEl={props.anchor}
anchorOrigin={{
vertical: "bottom",
Expand Down