Skip to content

Commit

Permalink
fix(website) add allow-popups-to-escape-sandbox to iframe sandbox fla…
Browse files Browse the repository at this point in the history
…gs so "Fork on StackBlitz" works
  • Loading branch information
etrepum committed Apr 29, 2024
1 parent 7e4c8c5 commit 20dcb29
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/lexical-website/docs/concepts/node-replacement.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
2 changes: 1 addition & 1 deletion packages/lexical-website/docs/getting-started/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand All @@ -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>
Expand Down

0 comments on commit 20dcb29

Please sign in to comment.