打包好的livecode,版本v-46
This commit is contained in:
44
docs/api/functions/createPlayground.html.md
Normal file
44
docs/api/functions/createPlayground.html.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Function: createPlayground()
|
||||
|
||||
## createPlayground(container, options)
|
||||
|
||||
> **createPlayground**(`container`, `options`?): `Promise`\<[`Playground`](../interfaces/Playground.md)\>
|
||||
|
||||
Creates a LiveCodes playground.
|
||||
|
||||
### Parameters
|
||||
|
||||
• **container**: `string` \| `HTMLElement`
|
||||
|
||||
`HTMLElement` or a string representing a CSS selector. This is the container where the playground is rendered.
|
||||
If not found, an error is thrown (except in [headless mode](https://livecodes.io/docs/sdk/headless), in which this parameter is optional and can be omitted).
|
||||
|
||||
• **options?**: [`EmbedOptions`](../interfaces/EmbedOptions.md)
|
||||
|
||||
The [embed options](https://livecodes.io/docs/sdk/js-ts#embed-options) for the playground (optional).
|
||||
|
||||
### Returns
|
||||
|
||||
`Promise`\<[`Playground`](../interfaces/Playground.md)\>
|
||||
|
||||
- A promise that resolves to a [`Playground`](https://livecodes.io/docs/api/interfaces/Playground/) object which exposes many [SDK methods](https://livecodes.io/docs/sdk/js-ts/#sdk-methods) that can be used to interact with the playground.
|
||||
|
||||
### Defined in
|
||||
|
||||
[index.ts:26](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/index.ts#L26)
|
||||
|
||||
## createPlayground(options)
|
||||
|
||||
> **createPlayground**(`options`): `Promise`\<[`Playground`](../interfaces/Playground.md)\>
|
||||
|
||||
### Parameters
|
||||
|
||||
• **options**: [`EmbedOptions`](../interfaces/EmbedOptions.md) & `object`
|
||||
|
||||
### Returns
|
||||
|
||||
`Promise`\<[`Playground`](../interfaces/Playground.md)\>
|
||||
|
||||
### Defined in
|
||||
|
||||
[index.ts:30](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/index.ts#L30)
|
||||
39
docs/api/functions/createPlayground/index.html
Normal file
39
docs/api/functions/createPlayground/index.html
Normal file
File diff suppressed because one or more lines are too long
25
docs/api/functions/getPlaygroundUrl.html.md
Normal file
25
docs/api/functions/getPlaygroundUrl.html.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Function: getPlaygroundUrl()
|
||||
|
||||
> **getPlaygroundUrl**(`options`): `string`
|
||||
|
||||
Gets the URL to a LiveCodes playground (as a string) from the provided [options](https://livecodes.io/docs/sdk/js-ts#embed-options).
|
||||
This can be useful for providing links to run code in playgrounds.
|
||||
|
||||
## Parameters
|
||||
|
||||
• **options**: [`EmbedOptions`](../interfaces/EmbedOptions.md) = `{}`
|
||||
|
||||
The [options](https://livecodes.io/docs/sdk/js-ts#embed-options) for the playground.
|
||||
|
||||
## Returns
|
||||
|
||||
`string`
|
||||
|
||||
- The URL of the playground (as a string).
|
||||
|
||||
large objects like config and params are store in the url hash params while the rest are in the search params
|
||||
unless config is a string in which case it is stored in searchParams
|
||||
|
||||
## Defined in
|
||||
|
||||
[index.ts:391](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/index.ts#L391)
|
||||
28
docs/api/functions/getPlaygroundUrl/index.html
Normal file
28
docs/api/functions/getPlaygroundUrl/index.html
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user