diff --git a/src/components/CodeEmbed/frame.tsx b/src/components/CodeEmbed/frame.tsx index 5119efad58..3880d93b63 100644 --- a/src/components/CodeEmbed/frame.tsx +++ b/src/components/CodeEmbed/frame.tsx @@ -1,4 +1,4 @@ -import { useRef, useLayoutEffect } from 'preact/hooks'; +import { useRef, useLayoutEffect, useEffect } from "preact/hooks"; import { p5VersionForEmbeds } from "@/src/globals/globals"; /* @@ -33,7 +33,20 @@ ${code.css || ""}
${code.htmlBody || ""} - + `.replace(/\u00A0/g, " "); export interface CodeFrameProps { @@ -52,6 +65,7 @@ export interface CodeFrameProps { export const CodeFrame = (props: CodeFrameProps) => { const iframeRef = useRef