Refactor(Render): Allow to read and write clipboard in iframe
This commit is contained in:
@@ -203,7 +203,8 @@ const Render = ({ iframeKey, compiledCode, mobileMode = false }: RenderProps) =>
|
|||||||
ref={iframeRef}
|
ref={iframeRef}
|
||||||
src={iframeUrl}
|
src={iframeUrl}
|
||||||
onLoad={() => setIsLoaded(true)}
|
onLoad={() => setIsLoaded(true)}
|
||||||
sandbox="allow-downloads allow-forms allow-modals allow-scripts clipboard-read clipboard-write"
|
sandbox="allow-downloads allow-forms allow-modals allow-scripts"
|
||||||
|
allow={'clipboard-read; clipboard-write'}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className={`device-footer${isRotate ? ' rotate' : ''}`} />
|
<div className={`device-footer${isRotate ? ' rotate' : ''}`} />
|
||||||
@@ -245,7 +246,8 @@ const Render = ({ iframeKey, compiledCode, mobileMode = false }: RenderProps) =>
|
|||||||
ref={iframeRef}
|
ref={iframeRef}
|
||||||
src={iframeUrl}
|
src={iframeUrl}
|
||||||
onLoad={() => setIsLoaded(true)}
|
onLoad={() => setIsLoaded(true)}
|
||||||
sandbox="allow-downloads allow-forms allow-modals allow-scripts clipboard-read clipboard-write"
|
sandbox={'allow-downloads allow-forms allow-modals allow-scripts'}
|
||||||
|
allow={'clipboard-read; clipboard-write'}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user