Code Prefill
There are many ways to pre-fill code into playgrounds. This is generally achieved either by the SDK or using query params.
Prefill using SDK
When creating an embeded playground, the following embed options allow prefill with code:
config
loads a configuration object (or a URL to JSON file represention the configuration object)
import
allows importing from many sources.
Examples:
Import GitHub gist:
Import shared project:
template
loads one of the starter templates.
Prefill using query params
Query parameters can provide easy and powerful ways for configuring the playground.
Example:
https://livecodes.io/?md=**Hello World!**