diff --git a/packages/core/package.json b/packages/core/package.json index d5d0d836..79bc245e 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -123,7 +123,7 @@ "react-dnd": "16.0.1", "react-dnd-html5-backend": "16.0.1", "react-dom": "18.2.0", - "react-frame-component": "5.2.3", + "react-frame-component": "5.2.4", "react-is": "18.2.0", "react-polyglot": "0.7.2", "react-redux": "8.0.5", diff --git a/packages/core/src/widgets/markdown/plate/components/nodes/code-block/CodeBlockElement.tsx b/packages/core/src/widgets/markdown/plate/components/nodes/code-block/CodeBlockElement.tsx index bf5e6791..1327e1d6 100644 --- a/packages/core/src/widgets/markdown/plate/components/nodes/code-block/CodeBlockElement.tsx +++ b/packages/core/src/widgets/markdown/plate/components/nodes/code-block/CodeBlockElement.tsx @@ -104,10 +104,10 @@ const CodeBlockElement: FC> ); const [height, setHeight] = useState(24); - const iframeRef = useRef(); + const iframeRef = useRef(); const handleResize = useCallback( - (iframe: MutableRefObject<(Frame & HTMLIFrameElement) | undefined>) => { + (iframe: MutableRefObject<(typeof Frame & HTMLIFrameElement) | undefined>) => { const height = iframe.current?.contentDocument?.body?.scrollHeight ?? 0; if (height !== 0) { setHeight(height); @@ -140,7 +140,7 @@ const CodeBlockElement: FC> & RefObject} + ref={iframeRef as RefObject & RefObject} style={{ border: 'none', width: '100%', diff --git a/yarn.lock b/yarn.lock index 72585d96..35996211 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13243,10 +13243,10 @@ react-dom@18.2.0: loose-envify "^1.1.0" scheduler "^0.23.0" -react-frame-component@5.2.3: - version "5.2.3" - resolved "https://registry.yarnpkg.com/react-frame-component/-/react-frame-component-5.2.3.tgz#2d5d1e29b23d5b915c839b44980d03bb9cafc453" - integrity sha512-r+h0o3r/uqOLNT724z4CRVkxQouKJvoi3OPfjqWACD30Y87rtEmeJrNZf1WYPGknn1Y8200HAjx7hY/dPUGgmA== +react-frame-component@5.2.4: + version "5.2.4" + resolved "https://registry.yarnpkg.com/react-frame-component/-/react-frame-component-5.2.4.tgz#8282849fe0eb315fb30b00c67e5e979f8f63c01a" + integrity sha512-4xpZFcLNS6LCEYSlWgsUy81v7LjdgbvB0VHIq7sNSD25PK+e5YYCrdy5557ebGwNLKNLEpYVfAkT3pVzFLPb1g== react-hotkeys-hook@^3.4.6: version "3.4.7"