Skip to content

Commit

Permalink
v0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lukejacksonn committed Nov 28, 2020
1 parent e4dd9be commit 9fa32db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ editor.getModel().onDidChangeContent((change) => {
It is also possible to embed the editor into your application using an iframe (see [demo](https://esm.codes/#Ly8gU2ltcGxlIG1vbmFjb2RlIGV4YW1wbGUgQGx1a2VqYWNrc29ubgovLyAtLS0tLS0tLS0tLS0tLS0tCiAgICAKaW1wb3J0IHsgcmVuZGVyLCBodG1sIH0gZnJvbSAnaHR0cHM6Ly9ucG0ucmV2ZXJzZWh0dHAuY29tL3ByZWFjdCxwcmVhY3QvaG9va3MsaHRtL3ByZWFjdCc7CgpyZW5kZXIoaHRtbGAKICA8aWZyYW1lCiAgICB3aWR0aD0iMTAwJSIKICAgIGhlaWdodD0iMTAwJSIKICAgIGZyYW1lQm9yZGVyPSIwIgogICAgc3JjPSJodHRwczovL21vbmFjb2RlLmxpdmU/dGhlbWU9dnMtZGFyayIKICAvPgpgLCBkb2N1bWVudC5ib2R5KQ==)):

```html
<iframe src="https://monacode.live?theme=vs-light"></iframe>
<iframe
src="https://monacode.live?theme=vs-light&value=console.log('hey')"
></iframe>
```

Pass config options into the iframe as URL search parameters, for example `?theme=vs-light&value=console.log('hey')`. It is not currently possible to pass in nested config options but hopefully will be in the future.
Pass config options into the iframe as URL search parameters, making sure to URI encode values properly. Please note however, it is not currently possible to pass in nested config options.

## API

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start": "servor --browse --reload --editor",
"prepublish": "npm run build"
},
"version": "0.3.0",
"version": "0.3.1",
"devDependencies": {
"esbuild": "0.6.12",
"servor": "4.0.2"
Expand Down

0 comments on commit 9fa32db

Please sign in to comment.