mirror of
https://github.com/facebook/lexical.git
synced 2025-05-17 06:59:17 +08:00
[lexical-website] Bug Fix: add allow-popups-to-escape-sandbox to iframe sandbox flags (#5988)
This commit is contained in:
@ -28,5 +28,5 @@ Once this is done, Lexical will replace all ParagraphNode instances with CustomP
|
||||
style="width:100%; height:700px; border:0; border-radius:4px; overflow:hidden;"
|
||||
title="lexical-collapsible-container-plugin-example"
|
||||
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
|
||||
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
||||
sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts"
|
||||
></iframe>
|
||||
|
@ -183,4 +183,4 @@ mergeRegister(
|
||||
);
|
||||
```
|
||||
|
||||
<iframe width="100%" height="400" src="https://stackblitz.com/github/facebook/lexical/tree/main/examples/vanilla-js-plugin?embed=1&file=src%2Femoji-plugin%2FEmojiPlugin.ts&terminalHeight=1&ctl=1"></iframe>
|
||||
<iframe width="100%" height="400" src="https://stackblitz.com/github/facebook/lexical/tree/main/examples/vanilla-js-plugin?embed=1&file=src%2Femoji-plugin%2FEmojiPlugin.ts&terminalHeight=1&ctl=1" sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts"></iframe>
|
||||
|
@ -128,4 +128,4 @@ editor.registerUpdateListener(({editorState}) => {
|
||||
|
||||
Here we have simplest Lexical setup in rich text configuration (`@lexical/rich-text`) with history (`@lexical/history`) and accessibility (`@lexical/dragon`) features enabled.
|
||||
|
||||
<iframe width="100%" height="400" src="https://stackblitz.com/github/facebook/lexical/tree/main/examples/vanilla-js?embed=1&file=src%2Fmain.ts&terminalHeight=0&ctl=1"></iframe>
|
||||
<iframe width="100%" height="400" src="https://stackblitz.com/github/facebook/lexical/tree/main/examples/vanilla-js?embed=1&file=src%2Fmain.ts&terminalHeight=0&ctl=1" sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts"></iframe>
|
||||
|
@ -81,7 +81,7 @@ Below you can find an example of the integration from the previous chapter that
|
||||
|
||||
However no UI can be created w/o CSS and Lexical is not an exception here. Pay attention to `ExampleTheme.ts` and how it's used in this example, with corresponding styles defined in `styles.css`.
|
||||
|
||||
<iframe width="100%" height="400" src="https://stackblitz.com/github/facebook/lexical/tree/main/examples/react-rich?embed=1&file=src%2FApp.tsx&terminalHeight=0&ctl=1"></iframe>
|
||||
<iframe width="100%" height="400" src="https://stackblitz.com/github/facebook/lexical/tree/main/examples/react-rich?embed=1&file=src%2FApp.tsx&terminalHeight=0&ctl=1" sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts"></iframe>
|
||||
|
||||
|
||||
## Saving Lexical State
|
||||
|
@ -79,7 +79,7 @@ export default function HomepageExamples() {
|
||||
</ul>
|
||||
</Tabs.List>
|
||||
|
||||
{EXAMPLES.map(({id, content, src}) => (
|
||||
{EXAMPLES.map(({id, content, src, label}) => (
|
||||
<Tabs.Content asChild={true} value={id} key={id}>
|
||||
<div className="grid gap-6 lg:grid-cols-[1fr_2fr]">
|
||||
<div className="flex flex-col gap-6">
|
||||
@ -98,8 +98,8 @@ export default function HomepageExamples() {
|
||||
<iframe
|
||||
className="h-[500px] w-full overflow-hidden"
|
||||
src={src}
|
||||
title="lexical-plain-text-example"
|
||||
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
|
||||
title={label}
|
||||
sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user