From 4f55364f656e9fef9f48141d2c9c06824688dd4a Mon Sep 17 00:00:00 2001 From: FatttSnake Date: Sun, 12 May 2024 04:09:06 +0800 Subject: [PATCH] Refactor(Render): Allow to read and write clipboard in iframe --- .../src/components/Playground/Output/Preview/Render.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/renderer/src/components/Playground/Output/Preview/Render.tsx b/src/renderer/src/components/Playground/Output/Preview/Render.tsx index 102dd2c..3ef5fb7 100644 --- a/src/renderer/src/components/Playground/Output/Preview/Render.tsx +++ b/src/renderer/src/components/Playground/Output/Preview/Render.tsx @@ -204,6 +204,7 @@ const Render = ({ iframeKey, compiledCode, mobileMode = false }: RenderProps) => src={iframeUrl} onLoad={() => setIsLoaded(true)} sandbox="allow-downloads allow-forms allow-modals allow-scripts" + allow={'clipboard-read; clipboard-write'} />
@@ -246,6 +247,7 @@ const Render = ({ iframeKey, compiledCode, mobileMode = false }: RenderProps) => src={iframeUrl} onLoad={() => setIsLoaded(true)} sandbox="allow-downloads allow-forms allow-modals allow-scripts" + allow={'clipboard-read; clipboard-write'} /> ) }