diff --git a/packages/editor/src/Editor.tsx b/packages/editor/src/Editor.tsx index 0f770077..04f928b3 100644 --- a/packages/editor/src/Editor.tsx +++ b/packages/editor/src/Editor.tsx @@ -915,6 +915,8 @@ const EditorContent = ({ } if (event.data.type === "@easyblocks-editor/paste-items") { + console.log(focussedField); + actions.pasteItems(event.data.payload.configs); } @@ -1059,7 +1061,7 @@ const EditorContent = ({ window.addEventListener("message", handleEditorEvents); return () => window.removeEventListener("message", handleEditorEvents); - }, []); + }, [focussedField]); const shopstoryCanvasIframe = useRef(null);