Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Commit e001592

Browse files
committed
readme
1 parent f9a0046 commit e001592

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,20 @@ A react component to render a code cell in your app.
2121

2222
#### Props
2323

24-
| Prop | Type | Description |
25-
| -------------- | ------------------------ | ----------------------------------------------------------------------------- |
26-
| `cellId` | `string` | Unique id for the cell |
27-
| `appName` | `string` | Unique app name |
28-
| `code` | `string` | Initial code for the cell |
29-
| `onAOProcess` | `(pid:string) => void` | Callback function that run whenever a process is is loaded |
30-
| `onNewMessage` | `(msgs: msg[]) => void` | Callback function, runs whenever process gets new messages |
31-
| `onInbox` | `(inbox: msg[]) => void` | Callback function, runs whenever Inbox is received after calling `getInbox()` |
32-
| `width` | `string` | Width of the cell |
33-
| `height` | `string` | Height of the cell |
34-
| `className` | `string` | Class names for styling |
35-
| `style` | `React.CSSProperties` | Inline styles |
36-
| `devMode` | `boolean` | Boolean to enable dev mode |
24+
| Prop | Type | Description |
25+
| -------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
26+
| `cellId` | `string` | Unique id for the cell |
27+
| `appName` | `string` | Unique app name |
28+
| `code` | `string` | Initial code for the cell |
29+
| `nowallet` | `boolean` | Set this to `true` if you dont want to use a web wallet, and generate a local jwk file (works on mobile) Recommended for playgrounds |
30+
| `onAOProcess` | `(pid:string) => void` | Callback function that run whenever a process is is loaded |
31+
| `onNewMessage` | `(msgs: msg[]) => void` | Callback function, runs whenever process gets new messages |
32+
| `onInbox` | `(inbox: msg[]) => void` | Callback function, runs whenever Inbox is received after calling `getInbox()` |
33+
| `width` | `string` | Width of the cell |
34+
| `height` | `string` | Height of the cell |
35+
| `className` | `string` | Class names for styling |
36+
| `style` | `React.CSSProperties` | Inline styles |
37+
| `devMode` | `boolean` | Boolean to enable dev mode |
3738

3839

3940
### `getInbox(...)`
@@ -77,9 +78,9 @@ import { CodeCell } from '@betteridea/codecell';
7778

7879
// in your react app
7980
<CodeCell
80-
cellId="1"
81-
appName="BetterIDEa-Code-Cell"
82-
code="print('Portable code cell ftw!')"
81+
cellId="1"
82+
appName="BetterIDEa-Code-Cell"
83+
code="print('Portable code cell ftw!')"
8384
onAOProcess={(pid)=> console.log("using process: ", pid)}
8485
onNewMessage={(msgs) => console.log("new messages: ", msgs)}
8586
onInbox={(inbox) => console.log("got inbox: ", inbox)}
@@ -138,4 +139,4 @@ then make changes to the component and run function and test them in the vite ap
138139

139140
3. `/codecell` webview -> [next_app/src/pages/codecell.tsx](https://github.com/betteridea-dev/ide/blob/main/next_app/src/pages/codecell.tsx)
140141

141-
The package is essentially a wrapper around https://ide.betteridea.dev/codecell route from the main [IDE](https://ide.betteridea.dev) to run code in any webapp through a webview.
142+
The package is essentially a wrapper around https://ide.betteridea.dev/codecell route from the main [IDE](https://ide.betteridea.dev) to run code in any webapp through a webview.

0 commit comments

Comments
 (0)