Config Interface
TheConfig interface extends three main configuration categories:
Content Configuration
Properties that define the content of the current project.Project Metadata
Project title. Used as result page title, title meta tag, and in project search.
Project description. Used in project search and result page description meta tag.
Project tags. Used in project filter and search.
HTML Configuration
Content added to the result page
<head> element.Attributes added to the result page
<html> element. Can be an object or string.Editor Configuration
Selects the active editor to show. Defaults to the last used editor for user, otherwise
"markup".Configuration for the markup editor.See Editor interface for details.
Configuration for the style editor.See Editor interface for details.
Configuration for the script editor.See Editor interface for details.
List of enabled languages. Defaults to all supported languages in full app and only current editor languages in embeds.
External Resources
List of URLs for external stylesheets to add to the result page.
List of URLs for external scripts to add to the result page.
CSS preset to use.
"normalize.css": Normalize.css for consistent cross-browser styling"reset-css": CSS reset to remove default browser styles"": No preset
Processors
List of enabled CSS processors.Available processors:
"postcss""tailwindcss""windicss""unocss""tokencss""lightningcss""autoprefixer""postcssPresetEnv""cssmodules""purgecss""cssnano"
Module Resolution
Custom import maps for module resolution.This creates an import map:
Custom TypeScript type declarations for editor IntelliSense.
Tests
Configures the language and content of tests.
Custom Settings
Advanced language-specific and compiler settings.See Custom Settings for details.
Version
Read-only property specifying the current LiveCodes version. Used for automatic configuration upgrades when importing projects.
App Configuration
Properties that define how the app behaves.Display and Behavior
If
true, editors are loaded in read-only mode. Users cannot change the code.By default, the lightweight CodeJar editor is used in readonly mode. To use a different editor, set the editor property.If
false, the UI does not show the menu for changing editor language.Sets the default view for the playground.
"split": Shows both editor and result side-by-side"editor": Shows only the editor"result": Shows only the result page
Sets the display mode.See Display Modes for details on each mode.
Sets result page zoom level.
1: 100% zoom (default)0.5: 50% zoom0.25: 25% zoom
Tools Configuration
Sets enabled and active tools and status of tools pane.Available tools:
"console": JavaScript console"compiled": Compiled code viewer"tests": Test runner and results
User Configuration
User preferences and settings.Auto Features
If
true, the result page is automatically updated on code change after the specified delay.If
true, the project is automatically saved on code change after the specified delay.If
true, tests automatically run on code changes.Time delay in milliseconds following code change, after which the result page is updated (if
autoupdate is true) and/or the project is saved (if autosave is true).If
true, code is automatically formatted when saving the project.Layout and UI
Sets the app layout.
"responsive": Vertical on small screens when height is greater than width, otherwise horizontal"horizontal": Always horizontal layout"vertical": Always vertical layout
Enables recovering last unsaved project when the app is reopened.
Enables showing element spacing in the result page.
If
true, the welcome screen is displayed when the app loads.Sets the app UI language.Available languages:
"auto", "ar", "bn", "de", "en", "es", "fa", "fr", "hi", "id", "it", "ja", "nl", "pt", "tr", "ru", "ur", "zh-CN"Editor Settings
Selects the code editor to use.
undefined: Monaco on desktop, CodeMirror on mobile, CodeJar in lite/readonly/codeblock modes"auto": Monaco on desktop, CodeMirror on mobile (regardless of other settings)"monaco": Always use Monaco editor"codemirror": Always use CodeMirror editor"codejar": Always use CodeJar editor
Sets the app theme.
Sets the app theme color. Defaults to
"hsl(214, 40%, 50%)".Sets the code editor font family.
Sets the font size. Defaults to 14 for full app, 12 for embeds.
If
true, lines are indented with tabs instead of spaces. Also used in code formatting.Number of spaces per indentation level. Also used in code formatting.
Show line numbers in code editor.
true: Show absolute line numbersfalse: Hide line numbers"relative": Show relative line numbers (Vim-style)
Enables word-wrap for long lines.
When
true, regions marked by #region and #endregion comments are folded when the project loads.Use auto-complete to close brackets and quotes.
Enables minimap in code editor.
Enables Emmet abbreviations.
Sets editor mode for keybindings.
"vim": Vim keybindings"emacs": Emacs keybindingsundefined: Standard editor keybindings
Formatter Settings
Configures Prettier code formatter to use semicolons.
Configures Prettier code formatter to use single quotes instead of double quotes.
Configures Prettier code formatter to use trailing commas.
Editor Interface
TheEditor interface defines configuration for each code editor (markup, style, script).
The initial content of the code editor.
A URL to load
content from. Must be a valid CORS-enabled URL.Only fetched if content property has no value.Hidden content that gets evaluated without being visible in the code editor.Useful for helper functions, utilities, or tests in embedded playgrounds.
A URL to load
hiddenContent from. Must be a valid CORS-enabled URL.Only fetched if hiddenContent property has no value.Lines that get folded when the editor loads.
Custom title for the editor in the UI. Overrides the default language name.
If
true, the title of the code editor is hidden, but the code is still evaluated.Useful in embedded playgrounds for hiding unnecessary code.The order of the editor in the UI.
A CSS selector to load content from DOM import.
The initial cursor position in the code editor.
Complete Example
Related Documentation
Query Parameters
Configure playgrounds using URL parameters
Editor Settings
Detailed editor configuration options
Custom Settings
Advanced language-specific settings
Display Modes
Different playground display modes