Basic Usage
Query parameters can be added to the LiveCodes URL after a? character:
&:
Parameter Types
URL query parameters in LiveCodes can be grouped into several categories:Language Content Parameters
Set editor content by using the language name, alias, or extension as the parameter key:Language Selection
Select the active language without providing content:Set the active editor language.
Alias for
lang.Comma-separated list of enabled languages.
Active Editor
Set which editor is active.
Alias for
activeEditor. Can use editor name or index (0=markup, 1=style, 2=script).Configuration Properties
Most Config properties can be set via query parameters:Project title.
Project description.
Comma-separated project tags.
Display mode.
Default view.
Enable read-only mode.
App theme.
Enable auto-update.
Auto-update delay in milliseconds.
External Resources
Comma-separated list of external stylesheet URLs.
Comma-separated list of external script URLs.
CSS preset to apply.
Processors
Comma-separated list of CSS processors.
Tools Configuration
Configure tools pane status and enabled tools.Format:
enabled-tools|statusConfigure console tool.
Configure compiled code viewer tool.
Configure tests tool.
Special Parameters
Enable lite mode (same as
mode=lite).Import from external source.
Load a starter template.
URL to a JSON configuration file.
Nested Property Parameters
You can set nested properties using dot notation:Advanced Examples
Simple HTML/CSS/JS Demo
TypeScript with React
Read-only Code Block
Python with Console
Tailwind CSS Enabled
Multiple Languages Enabled
Custom Settings via JSON
Import from GitHub Gist
URL Encoding
Special characters in parameter values must be URL-encoded:| Character | Encoded |
|---|---|
| Space | %20 |
< | %3C |
> | %3E |
" | %22 |
# | %23 |
& | %26 |
= | %3D |
Most programming languages and tools provide built-in functions for URL encoding (e.g.,
encodeURIComponent() in JavaScript).Parameter Compression
For complex configurations, use the compressedparams parameter:
Compressed and encoded JSON configuration object.This is automatically generated by the SDK’s
getShareUrl() method.Hash Parameters
Parameters can also be provided in the URL hash (after#). Hash parameters take precedence over query parameters:
new will be used.
Boolean Values
Boolean parameters can be specified in multiple ways:SDK Integration
In the SDK, use theparams option in embed options:
Precedence Rules
When multiple configuration sources exist:- Default configuration
- User configuration (from SDK or stored preferences)
- Query string parameters
- Hash parameters (override query parameters)
Limitations
Generating Share URLs
Use the SDK’sgetShareUrl() method to generate properly formatted URLs:
Related Documentation
Configuration Object
Complete Config object reference
SDK Methods
Learn about getShareUrl() and other SDK methods
Share Feature
Sharing playgrounds with others
Import Feature
Importing code from external sources