Skip to content

Commit 1d1698e

Browse files
committed
Update docs for embed
1 parent 05f552a commit 1d1698e

File tree

1 file changed

+20
-27
lines changed

1 file changed

+20
-27
lines changed

packages/homepage/content/docs/2-embedding.md

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,24 @@ The options shown in the embed modal are not all options available. We need a
3131
new UI for the share model to reflect these options, in the meantime you can
3232
find them here.
3333

34-
| Option | Description | Values | Default |
35-
| ---------------- | ----------------------------------------------------------------------------- | ------------------------------------ | ------------------------------------ |
36-
| `hidenavigation` | Hide the navigation bar of the preview. | `0`/`1` | `0` |
37-
| `moduleview` | Evaluate the file that is open in the editor. | `0`/`1` | `0` |
38-
| `autoresize` | Automatically resize the embed to the content (only works on Medium). | `0`/`1` | `0` |
39-
| `codemirror` | Use CodeMirror editor instead of Monaco (decreases embed size significantly). | `0`/`1` | `0` |
40-
| `eslint` | Use eslint (increases embed size significantly). | `0`/`1` | `0` |
41-
| `forcerefresh` | Force a full refresh of frame after every edit. | `0`/`1` | `0` |
42-
| `expanddevtools` | Start with the devtools (console) open. | `0`/`1` | `0` |
43-
| `runonclick` | Only load the preview when the user says so. | `0`/`1` | `0` |
44-
| `view` | Which view to open by default | `editor`/`split`/`preview` | `split`, `preview` for small screens |
45-
| `previewwindow` | Which preview window to open by default | `console`/`tests`/`browser` | `browser` |
46-
| `module` | Which module to open by default | path to module (starting with `/`) | entry path |
47-
| `initialpath` | Which url to initially load in address bar | string | `/` |
48-
| `fontsize` | Font size of editor | number (in px) | `14` |
49-
| `highlights` | Which lines to highlight (only works in CodeMirror) | comma separated list of line numbers | |
50-
| `editorsize` | Size in percentage of editor. | number | `50` |
51-
| `verticallayout` | Whether to show the editor and preview vertically. | `0`/`1` | `0` |
34+
| Option | Description | Values | Default |
35+
| ---------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------ | ------------------------------------ |
36+
| `autoresize` | Automatically resize the embed to the content (only works on Medium). | `0`/`1` | `0` |
37+
| `codemirror` | Use CodeMirror editor instead of Monaco (decreases embed size significantly). | `0`/`1` | `0` |
38+
| `editorsize` | Size in percentage of editor. | number | `50` |
39+
| `eslint` | Use eslint (increases embed size significantly). | `0`/`1` | `0` |
40+
| `expanddevtools` | Start with the devtools (console) open. | `0`/`1` | `0` |
41+
| `fontsize` | Font size of editor | number (in px) | `14` |
42+
| `forcerefresh` | Force a full refresh of frame after every edit. | `0`/`1` | `0` |
43+
| `hidenavigation` | Hide the navigation bar of the preview. | `0`/`1` | `0` |
44+
| `highlights` | Which lines to highlight (only works in CodeMirror) | comma separated list of line numbers | |
45+
| `initialpath` | Which url to initially load in address bar | string | `/` |
46+
| `module` | Which module to open by default. Multiple paths comma separated are allowed, in that case we show them as tabs | path to module (starting with `/`) | entry path |
47+
| `moduleview` | Evaluate the file that is open in the editor. | `0`/`1` | `0` |
48+
| `previewwindow` | Which preview window to open by default | `console`/`tests`/`browser` | `browser` |
49+
| `runonclick` | Only load the preview when the user says so. | `0`/`1` | `0` |
50+
| `verticallayout` | Whether to show the editor and preview vertically. | `0`/`1` | `0` |
51+
| `view` | Which view to open by default | `editor`/`split`/`preview` | `split`, `preview` for small screens |
5252

5353
## Example Embeds
5454

@@ -62,10 +62,7 @@ This embed is focused on being as light as possible:
6262

6363
Use this code to embed:
6464

65-
`<iframe src="https://codesandbox.io/embed/new?codemirror=1" style="width:100%;
66-
height:500px; border:0; border-radius: 4px; overflow:hidden;"
67-
sandbox="allow-modals allow-forms allow-popups allow-scripts
68-
allow-same-origin"></iframe>`
65+
`<iframe src="https://codesandbox.io/embed/new?codemirror=1" style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;" sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"></iframe>`
6966

7067
That will give to a result like this:
7168

@@ -80,11 +77,7 @@ is only supported with the CodeMirror editor currently:
8077

8178
Use this code to embed:
8279

83-
`<iframe
84-
src="https://codesandbox.io/embed/new?codemirror=1&highlights=11,12,13,14"
85-
style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
86-
sandbox="allow-modals allow-forms allow-popups allow-scripts
87-
allow-same-origin"></iframe>`
80+
`<iframe src="https://codesandbox.io/embed/new?codemirror=1&highlights=11,12,13,14" style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;" sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"></iframe>`
8881

8982
That will give to a result like this:
9083

0 commit comments

Comments
 (0)