generated from shuding/nextra-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
134 additions
and
81 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Integrating with other webpages | ||
|
||
You can use our IDE code cell on your website by embedding it through an iframe. | ||
|
||
This can be used on documentation pages or any other webpage where you want to show code snippets and let the user run them. | ||
|
||
## Iframe usage | ||
|
||
```jsx | ||
<iframe | ||
src="https://ide.betteridea.dev/?codeblock" | ||
width="100%" | ||
height="250px" | ||
style={{ borderRadius: 10 }} | ||
allowTransparency | ||
></iframe> | ||
``` | ||
|
||
will produce something like | ||
|
||
<iframe src="https://ide.betteridea.dev/?codeblock" width="100%" height="250px" style={{borderRadius:10}} allowTransparency></iframe> | ||
|
||
## Custom code | ||
|
||
Just add a url parameter value `?codeblock=<URL encoded lua code>` | ||
|
||
example: for the lua code `Inbox[#Inbox].Data --Latest message data`, the URL encoded code would be `Inbox%5B%23Inbox%5D.Data%20--Latest%20message%20data` | ||
|
||
and can be used as `https://ide.betteridea.dev/?codeblock=Inbox%5B%23Inbox%5D.Data%20--Latest%20message%20data` | ||
|
||
```jsx | ||
<iframe | ||
src="http://ide.betteridea.dev/?codeblock=Inbox%5B%23Inbox%5D.Data%20--Latest%20message%20data" | ||
width="100%" | ||
height="250px" | ||
style={{ borderRadius: 10 }} | ||
allowTransparency | ||
></iframe> | ||
``` | ||
|
||
will preload the code cell with the lua code you provide in the url parameter | ||
|
||
<iframe src="https://ide.betteridea.dev/?codeblock=Inbox%5B%23Inbox%5D.Data%20--Latest%20message%20data" width="100%" height="250px" style={{borderRadius:10}} allowTransparency></iframe> |