From f04a4090783740897cfe40cca88dbe38e1a17332 Mon Sep 17 00:00:00 2001 From: FatttSnake Date: Sun, 12 May 2024 03:43:36 +0800 Subject: [PATCH] Refactor(Render): Allow to read and write clipboard in iframe --- src/components/Playground/Output/Preview/Render.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Playground/Output/Preview/Render.tsx b/src/components/Playground/Output/Preview/Render.tsx index 102dd2c..3c8651a 100644 --- a/src/components/Playground/Output/Preview/Render.tsx +++ b/src/components/Playground/Output/Preview/Render.tsx @@ -203,7 +203,7 @@ const Render = ({ iframeKey, compiledCode, mobileMode = false }: RenderProps) => ref={iframeRef} src={iframeUrl} onLoad={() => setIsLoaded(true)} - sandbox="allow-downloads allow-forms allow-modals allow-scripts" + sandbox="allow-downloads allow-forms allow-modals allow-scripts clipboard-read clipboard-write" />
@@ -245,7 +245,7 @@ const Render = ({ iframeKey, compiledCode, mobileMode = false }: RenderProps) => ref={iframeRef} src={iframeUrl} onLoad={() => setIsLoaded(true)} - sandbox="allow-downloads allow-forms allow-modals allow-scripts" + sandbox="allow-downloads allow-forms allow-modals allow-scripts clipboard-read clipboard-write" /> ) } -- 2.49.1