From 9ebe187029c529aa308333c8dcd944f9bbcf814b Mon Sep 17 00:00:00 2001 From: Kristin Aoki <42981026+KristinAoki@users.noreply.github.com> Date: Wed, 6 Sep 2023 16:48:21 -0400 Subject: [PATCH] fix: undefined set selection for image modal (#384) --- .../TinyMceWidget/__snapshots__/index.test.jsx.snap | 6 +++--- src/editors/sharedComponents/TinyMceWidget/index.jsx | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/editors/sharedComponents/TinyMceWidget/__snapshots__/index.test.jsx.snap b/src/editors/sharedComponents/TinyMceWidget/__snapshots__/index.test.jsx.snap index d5da2d184..bef0f0f25 100644 --- a/src/editors/sharedComponents/TinyMceWidget/__snapshots__/index.test.jsx.snap +++ b/src/editors/sharedComponents/TinyMceWidget/__snapshots__/index.test.jsx.snap @@ -52,7 +52,7 @@ exports[`TinyMceWidget snapshots ImageUploadModal is not rendered 1`] = ` "placeholder": undefined, "selection": "hooks.selectedImage.selection", "setEditorRef": undefined, - "setSelection": undefined, + "setSelection": [MockFunction hooks.selectedImage.setSelection], "studioEndpointUrl": "sOmEoThERvaLue.cOm", "updateContent": [Function], } @@ -129,7 +129,7 @@ exports[`TinyMceWidget snapshots SourcecodeModal is not rendered 1`] = ` "placeholder": undefined, "selection": "hooks.selectedImage.selection", "setEditorRef": undefined, - "setSelection": undefined, + "setSelection": [MockFunction hooks.selectedImage.setSelection], "studioEndpointUrl": "sOmEoThERvaLue.cOm", "updateContent": [Function], } @@ -217,7 +217,7 @@ exports[`TinyMceWidget snapshots renders as expected with default behavior 1`] = "placeholder": undefined, "selection": "hooks.selectedImage.selection", "setEditorRef": undefined, - "setSelection": undefined, + "setSelection": [MockFunction hooks.selectedImage.setSelection], "studioEndpointUrl": "sOmEoThERvaLue.cOm", "updateContent": [Function], } diff --git a/src/editors/sharedComponents/TinyMceWidget/index.jsx b/src/editors/sharedComponents/TinyMceWidget/index.jsx index b59e2a41f..b2cbecfc7 100644 --- a/src/editors/sharedComponents/TinyMceWidget/index.jsx +++ b/src/editors/sharedComponents/TinyMceWidget/index.jsx @@ -31,7 +31,6 @@ const editorConfigDefaultProps = { setEditorRef: undefined, placeholder: undefined, initializeEditor: undefined, - setSelection: undefined, updateContent: undefined, content: undefined, minHeight: undefined, @@ -41,7 +40,6 @@ const editorConfigPropTypes = { setEditorRef: PropTypes.func, placeholder: PropTypes.any, initializeEditor: PropTypes.func, - setSelection: PropTypes.func, updateContent: PropTypes.func, content: PropTypes.any, minHeight: PropTypes.any,