You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| code | PropTypes.string | The code that should be rendered, apart from the user’s edits |
15
-
| scope | PropTypes.object | Accepts custom globals that the `code` can use |
16
-
| noInline | PropTypes.bool | Doesn’t evaluate and mount the inline code (Default: `false`). Note: when using `noInline` whatever code you write must be a single expression (function, class component or some `jsx`) that can be returned immediately. If you'd like to render multiple components, use `noInline={true}`|
17
-
| transformCode | PropTypes.func | Accepts and returns the code to be transpiled, affording an opportunity to first transform it |
18
-
| language | PropTypes.string | What language you're writing for correct syntax highlighting. (Default: `jsx`) |
19
-
| disabled | PropTypes.bool | Disable editing on the `<LiveEditor />` (Default: `false`) |
20
-
| theme | PropTypes.object | A `prism-react-renderer` theme object. See more [here](https://github.com/FormidableLabs/prism-react-renderer#theming)|
| code |`PropTypes.string`| The code that should be rendered, apart from the user’s edits |
15
+
| scope |`PropTypes.object`| Accepts custom globals that the `code` can use |
16
+
| noInline |`PropTypes.bool`| Doesn’t evaluate and mount the inline code (Default: `false`). Note: when using `noInline` whatever code you write must be a single expression (function, class component or some `jsx`) that can be returned immediately. If you'd like to render multiple components, use `noInline={true}`|
17
+
| transformCode |`PropTypes.func`| Accepts and returns the code to be transpiled, affording an opportunity to first transform it |
18
+
| language |`PropTypes.string`| What language you're writing for correct syntax highlighting. (Default: `jsx`) |
19
+
| disabled |`PropTypes.bool`| Disable editing on the `<LiveEditor />` (Default: `false`) |
20
+
| theme |`PropTypes.object`| A `prism-react-renderer` theme object. See more [here](https://github.com/FormidableLabs/prism-react-renderer#theming)|
21
21
22
22
All subsequent components must be rendered inside a provider, since they communicate
23
23
using one.
@@ -26,31 +26,31 @@ The `noInline` option kicks the Provider into a different mode, where you can wr
26
26
code and nothing gets evaluated and mounted automatically. Your example will need to call `render`
27
27
with valid JSX elements.
28
28
29
-
### <LiveEditor />
29
+
### `<LiveEditor />`
30
30
31
31
This component renders the editor that displays the code. It is a wrapper around [`react-simple-code-editor`](https://github.com/satya164/react-simple-code-editor) and the code highlighted using [`prism-react-renderer`](https://github.com/FormidableLabs/prism-react-renderer).
Copy file name to clipboardExpand all lines: docs/introduction.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,9 @@ import { DemoLiveEditor } from "../website/src/components/live-edit";
7
7
8
8
# Introduction
9
9
10
-
**React Live** brings you the ability to render React components with editable source code and live preview. React Live is structured modularly and lets you style and compose its components freely. The following demos show typical use cases including the editor, preview, and error pane components. To see React Live in action make changes to the following editor panes below.
10
+
**React Live** brings you the ability to render React components with editable source code and live preview. React Live is structured modularly and lets you style and compose its components freely. The following demos show typical use cases including the editor, preview, and error pane components.
11
+
12
+
To see React Live in action, make changes to the following editor panes:
0 commit comments