# Interface: EmbedOptions An object that represents the playground embed options. See [docs](https://livecodes.io/docs/sdk/js-ts/#embed-options) for details. ## Properties ### appUrl? > `optional` **appUrl**: `string` Allows loading the playground from a custom URL (e.g. a [self-hosted app](https://livecodes.io/docs/features/self-hosting) or a [permanent URL](https://livecodes.io/docs/features/permanent-url)). If supplied with an invalid URL, an error is thrown. #### Default ```ts 'https://livecodes.io' ``` #### Defined in [models.ts:314](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L314) *** ### config? > `optional` **config**: `string` \| `Partial`\<[`Config`](Config.md)\> A [configuration object](https://livecodes.io/docs/configuration/configuration-object) or a URL to a JSON file representing a configuration object to load. If supplied and is not an object or a valid URL, an error is thrown. #### Default ```ts {} ``` #### Defined in [models.ts:346](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L346) *** ### headless? > `optional` **headless**: `boolean` If `true`, the playground is loaded in [headless mode](https://livecodes.io/docs/sdk/headless). #### Default ```ts false ``` #### Defined in [models.ts:352](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L352) *** ### import? > `optional` **import**: `string` A resource to [import](https://livecodes.io/docs/features/import) (from any of the supported [sources](https://livecodes.io/docs/features/import#sources)). #### Defined in [models.ts:357](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L357) *** ### ~~lite?~~ > `optional` **lite**: `boolean` #### Deprecated Use `{ config: { mode: "lite" } }` instead If `true`, the playground is loaded in [lite mode](https://livecodes.io/docs/features/lite). #### Default ```ts false ``` #### Defined in [models.ts:367](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L367) *** ### loading? > `optional` **loading**: `"click"` \| `"eager"` \| `"lazy"` Sets how the playground loads: - `"eager"`: The playground loads immediately. - `"lazy"`: A playground embedded low down in the page will not load until the user scrolls so that it approaches the viewport. - `"click"`: The playground does not load automatically. Instead, a "Click-to-load" screen is shown. #### Default ```ts "lazy" ``` #### Defined in [models.ts:377](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L377) *** ### params? > `optional` **params**: `object` An object that represents the [URL Query parameters](https://livecodes.io/docs/configuration/query-params), that can be used to configure the playground. These 2 snippets produce similar output: ```js import { createPlayground } from 'livecodes'; // use config createPlayground('#container', { config: { markup: { language: 'markdown', content: '# Hello World!', }, }, }); // use params createPlayground('#container', { params: { md: '# Hello World!' } }); ``` #### active? > `optional` **active**: `0` \| `2` \| `1` \| [`EditorId`](../internal/type-aliases/EditorId.md) #### activeEditor? > `optional` **activeEditor**: `0` \| `2` \| `1` \| [`EditorId`](../internal/type-aliases/EditorId.md) #### adoc > **adoc**: `undefined` \| `string` #### adoc-selector > **adoc-selector**: `undefined` \| `string` #### allowLangChange? > `optional` **allowLangChange**: `boolean` If `false`, the UI will not show the menu that allows changing editor language. ##### Default ```ts true ``` #### app.svelte > **svelte**: `undefined` \| `string` #### app.svelte-selector > **svelte-selector**: `undefined` \| `string` #### app.vue > **vue**: `undefined` \| `string` #### app.vue-selector > **vue-selector**: `undefined` \| `string` #### appLanguage? > `optional` **appLanguage**: [`AppLanguage`](../internal/type-aliases/AppLanguage.md) Sets the app UI language used. #### appUrl? > `optional` **appUrl**: `string` Allows loading the playground from a custom URL (e.g. a [self-hosted app](https://livecodes.io/docs/features/self-hosting) or a [permanent URL](https://livecodes.io/docs/features/permanent-url)). If supplied with an invalid URL, an error is thrown. ##### Default ```ts 'https://livecodes.io' ``` #### art > **art**: `undefined` \| `string` #### art-selector > **art-selector**: `undefined` \| `string` #### art-template > **art-template**: `undefined` \| `string` #### art-template-selector > **art-template-selector**: `undefined` \| `string` #### as > **as**: `undefined` \| `string` #### as-selector > **as-selector**: `undefined` \| `string` #### asc > **asc**: `undefined` \| `string` #### asc-selector > **asc-selector**: `undefined` \| `string` #### asciidoc > **asciidoc**: `undefined` \| `string` #### asciidoc-selector > **asciidoc-selector**: `undefined` \| `string` #### assemblyscript > **assemblyscript**: `undefined` \| `string` #### assemblyscript-selector > **assemblyscript-selector**: `undefined` \| `string` #### astro > **astro**: `undefined` \| `string` #### astro-selector > **astro-selector**: `undefined` \| `string` #### autosave? > `optional` **autosave**: `boolean` If `true`, the project is automatically saved on code change, after time [delay](https://livecodes.io/docs/configuration/configuration-object#delay). ##### Default ```ts false ``` #### autotest? > `optional` **autotest**: `boolean` If `true`, the project is watched for code changes which trigger tests to auto-run. ##### Default ```ts false ``` #### autoupdate? > `optional` **autoupdate**: `boolean` If `true`, the result page is automatically updated on code change, after time [delay](https://livecodes.io/docs/configuration/configuration-object#delay). ##### Default ```ts true ``` #### babel > **babel**: `undefined` \| `string` #### babel-selector > **babel-selector**: `undefined` \| `string` #### bb > **bb**: `undefined` \| `string` #### bb-selector > **bb-selector**: `undefined` \| `string` #### bbcode > **bbcode**: `undefined` \| `string` #### bbcode-selector > **bbcode-selector**: `undefined` \| `string` #### Binary > **Binary**: `undefined` \| `string` #### Binary-selector > **Binary-selector**: `undefined` \| `string` #### blockly > **blockly**: `undefined` \| `string` #### blockly-selector > **blockly-selector**: `undefined` \| `string` #### blockly.xml > **xml**: `undefined` \| `string` #### blockly.xml-selector > **xml-selector**: `undefined` \| `string` #### c > **c**: `undefined` \| `string` #### C > **C**: `undefined` \| `string` #### c-selector > **c-selector**: `undefined` \| `string` #### C-selector > **C-selector**: `undefined` \| `string` #### c++ > **c++**: `undefined` \| `string` #### c++-selector > **c++-selector**: `undefined` \| `string` #### civet > **civet**: `undefined` \| `string` #### civet-selector > **civet-selector**: `undefined` \| `string` #### clang > **clang**: `undefined` \| `string` #### clang-selector > **clang-selector**: `undefined` \| `string` #### clang.cpp > **cpp**: `undefined` \| `string` #### clang.cpp-selector > **cpp-selector**: `undefined` \| `string` #### clio > **clio**: `undefined` \| `string` #### clio-selector > **clio-selector**: `undefined` \| `string` #### clj > **clj**: `undefined` \| `string` #### clj-selector > **clj-selector**: `undefined` \| `string` #### cljc > **cljc**: `undefined` \| `string` #### cljc-selector > **cljc-selector**: `undefined` \| `string` #### cljs > **cljs**: `undefined` \| `string` #### cljs-selector > **cljs-selector**: `undefined` \| `string` #### clojure > **clojure**: `undefined` \| `string` #### clojure-selector > **clojure-selector**: `undefined` \| `string` #### clojurescript > **clojurescript**: `undefined` \| `string` #### clojurescript-selector > **clojurescript-selector**: `undefined` \| `string` #### closeBrackets? > `optional` **closeBrackets**: `boolean` Use auto-complete to close brackets and quotes. ##### Default ```ts true ``` #### coffee > **coffee**: `undefined` \| `string` #### coffee-selector > **coffee-selector**: `undefined` \| `string` #### coffeescript > **coffeescript**: `undefined` \| `string` #### coffeescript-selector > **coffeescript-selector**: `undefined` \| `string` #### common-lisp > **common-lisp**: `undefined` \| `string` #### common-lisp-selector > **common-lisp-selector**: `undefined` \| `string` #### commonlisp > **commonlisp**: `undefined` \| `string` #### commonlisp-selector > **commonlisp-selector**: `undefined` \| `string` #### compiled > **compiled**: `undefined` \| `""` \| `"true"` \| `"none"` \| `"closed"` \| `"open"` \| `"full"` #### config? > `optional` **config**: `string` \| `Partial`\<[`Config`](Config.md)\> & `string` A [configuration object](https://livecodes.io/docs/configuration/configuration-object) or a URL to a JSON file representing a configuration object to load. If supplied and is not an object or a valid URL, an error is thrown. ##### Default ```ts {} ``` #### console > **console**: `undefined` \| `""` \| `"true"` \| `"none"` \| `"closed"` \| `"open"` \| `"full"` #### cp > **cp**: `undefined` \| `string` #### cp-selector > **cp-selector**: `undefined` \| `string` #### cpp > **cpp**: `undefined` \| `string` #### cpp-selector > **cpp-selector**: `undefined` \| `string` #### cpp-wasm > **cpp-wasm**: `undefined` \| `string` #### cpp-wasm-selector > **cpp-wasm-selector**: `undefined` \| `string` #### cppm > **cppm**: `undefined` \| `string` #### cppm-selector > **cppm-selector**: `undefined` \| `string` #### cppwasm > **cppwasm**: `undefined` \| `string` #### cppwasm-selector > **cppwasm-selector**: `undefined` \| `string` #### cs > **cs**: `undefined` \| `string` #### cs-selector > **cs-selector**: `undefined` \| `string` #### cs-wasm > **cs-wasm**: `undefined` \| `string` #### cs-wasm-selector > **cs-wasm-selector**: `undefined` \| `string` #### csharp > **csharp**: `undefined` \| `string` #### csharp-selector > **csharp-selector**: `undefined` \| `string` #### csharp-wasm > **csharp-wasm**: `undefined` \| `string` #### csharp-wasm-selector > **csharp-wasm-selector**: `undefined` \| `string` #### css > **css**: `undefined` \| `string` #### css-selector > **css-selector**: `undefined` \| `string` #### cssPreset? > `optional` **cssPreset**: [`CssPresetId`](../internal/type-aliases/CssPresetId.md) [CSS Preset](https://livecodes.io/docs/features/external-resources#css-presets) to use. #### customSettings? > `optional` **customSettings**: `object` Defines [custom settings](https://livecodes.io/docs/advanced/custom-settings) for the current project. #### customSettings.adoc > **adoc**: `any` #### customSettings.app.svelte > **svelte**: `any` #### customSettings.app.vue > **vue**: `any` #### customSettings.art > **art**: `any` #### customSettings.art-template > **art-template**: `any` #### customSettings.as > **as**: `any` #### customSettings.asc > **asc**: `any` #### customSettings.asciidoc > **asciidoc**: `any` #### customSettings.assemblyscript > **assemblyscript**: `any` #### customSettings.astro > **astro**: `any` #### customSettings.autoprefixer > **autoprefixer**: `any` #### customSettings.babel > **babel**: `any` #### customSettings.bb > **bb**: `any` #### customSettings.bbcode > **bbcode**: `any` #### customSettings.Binary > **Binary**: `any` #### customSettings.blockly > **blockly**: `any` #### customSettings.blockly.xml > **xml**: `any` #### customSettings.c > **c**: `any` #### customSettings.C > **C**: `any` #### customSettings.c++ > **c++**: `any` #### customSettings.civet > **civet**: `any` #### customSettings.clang > **clang**: `any` #### customSettings.clang.cpp > **cpp**: `any` #### customSettings.clio > **clio**: `any` #### customSettings.clj > **clj**: `any` #### customSettings.cljc > **cljc**: `any` #### customSettings.cljs > **cljs**: `any` #### customSettings.clojure > **clojure**: `any` #### customSettings.clojurescript > **clojurescript**: `any` #### customSettings.coffee > **coffee**: `any` #### customSettings.coffeescript > **coffeescript**: `any` #### customSettings.common-lisp > **common-lisp**: `any` #### customSettings.commonlisp > **commonlisp**: `any` #### customSettings.convertCommonjs? > `optional` **convertCommonjs**: `boolean` #### customSettings.cp > **cp**: `any` #### customSettings.cpp > **cpp**: `any` #### customSettings.cpp-wasm > **cpp-wasm**: `any` #### customSettings.cppm > **cppm**: `any` #### customSettings.cppwasm > **cppwasm**: `any` #### customSettings.cs > **cs**: `any` #### customSettings.cs-wasm > **cs-wasm**: `any` #### customSettings.csharp > **csharp**: `any` #### customSettings.csharp-wasm > **csharp-wasm**: `any` #### customSettings.css > **css**: `any` #### customSettings.cssmodules > **cssmodules**: `any` #### customSettings.cssnano > **cssnano**: `any` #### customSettings.cwasm > **cwasm**: `any` #### customSettings.cxx > **cxx**: `any` #### customSettings.defaultCDN? > `optional` **defaultCDN**: [`CDN`](../internal/type-aliases/CDN.md) #### customSettings.diagram > **diagram**: `any` #### customSettings.diagrams > **diagrams**: `any` #### customSettings.dot > **dot**: `any` #### customSettings.edn > **edn**: `any` #### customSettings.ejs > **ejs**: `any` #### customSettings.es > **es**: `any` #### customSettings.eta > **eta**: `any` #### customSettings.fennel > **fennel**: `any` #### customSettings.flow > **flow**: `any` #### customSettings.fnl > **fnl**: `any` #### customSettings.gleam > **gleam**: `any` #### customSettings.go > **go**: `any` #### customSettings.golang > **golang**: `any` #### customSettings.graph > **graph**: `any` #### customSettings.h > **h**: `any` #### customSettings.haml > **haml**: `any` #### customSettings.handlebars > **handlebars**: `any` #### customSettings.hbs > **hbs**: `any` #### customSettings.hpp > **hpp**: `any` #### customSettings.htm > **htm**: `any` #### customSettings.html > **html**: `any` #### customSettings.ii > **ii**: `any` #### customSettings.imba > **imba**: `any` #### customSettings.imports? > `optional` **imports**: `Record`\<`string`, `string`\> #### customSettings.ixx > **ixx**: `any` #### customSettings.jade > **jade**: `any` #### customSettings.java > **java**: `any` #### customSettings.javascript > **javascript**: `any` #### customSettings.jinja > **jinja**: `any` #### customSettings.jl > **jl**: `any` #### customSettings.js > **js**: `any` #### customSettings.json > **json**: `any` #### customSettings.jsx > **jsx**: `any` #### customSettings.julia > **julia**: `any` #### customSettings.less > **less**: `any` #### customSettings.lightningcss > **lightningcss**: `any` #### customSettings.liquid > **liquid**: `any` #### customSettings.liquidjs > **liquidjs**: `any` #### customSettings.lisp > **lisp**: `any` #### customSettings.livescript > **livescript**: `any` #### customSettings.ls > **ls**: `any` #### customSettings.lua > **lua**: `any` #### customSettings.lua-wasm > **lua-wasm**: `any` #### customSettings.luawasm > **luawasm**: `any` #### customSettings.malina > **malina**: `any` #### customSettings.malinajs > **malinajs**: `any` #### customSettings.mapImports? > `optional` **mapImports**: `boolean` #### customSettings.markdown > **markdown**: `any` #### customSettings.md > **md**: `any` #### customSettings.mdown > **mdown**: `any` #### customSettings.html.md) > **mdx**: `any` #### customSettings.mjml > **mjml**: `any` #### customSettings.mkdn > **mkdn**: `any` #### customSettings.ml > **ml**: `any` #### customSettings.mli > **mli**: `any` #### customSettings.mustache > **mustache**: `any` #### customSettings.njk > **njk**: `any` #### customSettings.nunjucks > **nunjucks**: `any` #### customSettings.ocaml > **ocaml**: `any` #### customSettings.perl > **perl**: `any` #### customSettings.pg > **pg**: `any` #### customSettings.pg.sql > **sql**: `any` #### customSettings.pglite > **pglite**: `any` #### customSettings.pglite.sql > **sql**: `any` #### customSettings.pgsql > **pgsql**: `any` #### customSettings.pgsql.sql > **sql**: `any` #### customSettings.php > **php**: `any` #### customSettings.php-wasm > **php-wasm**: `any` #### customSettings.phpwasm > **phpwasm**: `any` #### customSettings.pintora > **pintora**: `any` #### customSettings.pl > **pl**: `any` #### customSettings.plt > **plt**: `any` #### customSettings.pm > **pm**: `any` #### customSettings.postcss > **postcss**: `any` #### customSettings.postcssImportUrl > **postcssImportUrl**: `any` #### customSettings.postcssPresetEnv > **postcssPresetEnv**: `any` #### customSettings.postgre.sql > **sql**: `any` #### customSettings.postgres > **postgres**: `any` #### customSettings.postgresql > **postgresql**: `any` #### customSettings.postgresql.sql > **sql**: `any` #### customSettings.prolog > **prolog**: `any` #### customSettings.prolog.pl > **pl**: `any` #### customSettings.pug > **pug**: `any` #### customSettings.purgecss > **purgecss**: `any` #### customSettings.py > **py**: `any` #### customSettings.py-wasm > **py-wasm**: `any` #### customSettings.py3 > **py3**: `any` #### customSettings.pyodide > **pyodide**: `any` #### customSettings.python > **python**: `any` #### customSettings.python-wasm > **python-wasm**: `any` #### customSettings.pythonwasm > **pythonwasm**: `any` #### customSettings.pywasm > **pywasm**: `any` #### customSettings.r > **r**: `any` #### customSettings.r-wasm > **r-wasm**: `any` #### customSettings.rb > **rb**: `any` #### customSettings.re > **re**: `any` #### customSettings.react > **react**: `any` #### customSettings.react-jsx > **react-jsx**: `any` #### customSettings.react-native > **react-native**: `any` #### customSettings.react-native-tsx > **react-native-tsx**: `any` #### customSettings.react-native.jsx > **jsx**: `any` #### customSettings.react-native.tsx > **tsx**: `any` #### customSettings.react-tsx > **react-tsx**: `any` #### customSettings.react.jsx > **jsx**: `any` #### customSettings.react.tsx > **tsx**: `any` #### customSettings.reason > **reason**: `any` #### customSettings.rei > **rei**: `any` #### customSettings.res > **res**: `any` #### customSettings.rescript > **rescript**: `any` #### customSettings.resi > **resi**: `any` #### customSettings.rich > **rich**: `any` #### customSettings.richtext > **richtext**: `any` #### customSettings.riot > **riot**: `any` #### customSettings.riotjs > **riotjs**: `any` #### customSettings.rlang > **rlang**: `any` #### customSettings.rstats > **rstats**: `any` #### customSettings.rte > **rte**: `any` #### customSettings.rte.html > **html**: `any` #### customSettings.ruby > **ruby**: `any` #### customSettings.ruby-wasm > **ruby-wasm**: `any` #### customSettings.rubywasm > **rubywasm**: `any` #### customSettings.sass > **sass**: `any` #### customSettings.scheme > **scheme**: `any` #### customSettings.scm > **scm**: `any` #### customSettings.scriptType? > `optional` **scriptType**: `""` \| `"module"` \| `"text/liquid"` \| `"text/python"` \| `"text/r"` \| `"text/ruby-wasm"` \| `"text/x-uniter-php"` \| `"text/php-wasm"` \| `"text/cpp"` \| `"text/java"` \| `"text/csharp-wasm"` \| `"text/perl"` \| `"text/julia"` \| `"text/biwascheme"` \| `"text/commonlisp"` \| `"text/tcl"` \| `"text/prolog"` \| `"application/json"` \| `"application/lua"` \| `"text/fennel"` \| `"application/wasm-uint8"` \| `"application/javascript"` \| `"application/ecmascript"` \| `"text/javascript"` \| `"text/ecmascript"` #### customSettings.scss > **scss**: `any` #### customSettings.solid > **solid**: `any` #### customSettings.solid.jsx > **jsx**: `any` #### customSettings.solid.tsx > **tsx**: `any` #### customSettings.sql > **sql**: `any` #### customSettings.sqlite > **sqlite**: `any` #### customSettings.sqlite3 > **sqlite3**: `any` #### customSettings.stencil > **stencil**: `any` #### customSettings.stencil.tsx > **tsx**: `any` #### customSettings.styl > **styl**: `any` #### customSettings.stylis > **stylis**: `any` #### customSettings.stylus > **stylus**: `any` #### customSettings.sucrase > **sucrase**: `any` #### customSettings.svelte > **svelte**: `any` #### customSettings.svelte-app > **svelte-app**: `any` #### customSettings.tailwindcss > **tailwindcss**: `any` #### customSettings.tcl > **tcl**: `any` #### customSettings.teal > **teal**: `any` #### customSettings.template? > `optional` **template**: `object` #### customSettings.template.data? > `optional` **data**: `any` #### customSettings.template.prerender? > `optional` **prerender**: `boolean` #### customSettings.tl > **tl**: `any` #### customSettings.tokencss > **tokencss**: `any` #### customSettings.ts > **ts**: `any` #### customSettings.tsx > **tsx**: `any` #### customSettings.twig > **twig**: `any` #### customSettings.types? > `optional` **types**: [`Types`](../internal/interfaces/Types.md) #### customSettings.typescript > **typescript**: `any` #### customSettings.unocss > **unocss**: `any` #### customSettings.vento > **vento**: `any` #### customSettings.vto > **vto**: `any` #### customSettings.vue > **vue**: `any` #### customSettings.vue-app > **vue-app**: `any` #### customSettings.vue2 > **vue2**: `any` #### customSettings.vue3 > **vue3**: `any` #### customSettings.wasm > **wasm**: `any` #### customSettings.wasm.cpp > **cpp**: `any` #### customSettings.wasm.cs > **cs**: `any` #### customSettings.wasm.lua > **lua**: `any` #### customSettings.wasm.php > **php**: `any` #### customSettings.wasm.py > **py**: `any` #### customSettings.wasm.rb > **rb**: `any` #### customSettings.wast > **wast**: `any` #### customSettings.wat > **wat**: `any` #### customSettings.webassembly > **webassembly**: `any` #### customSettings.windicss > **windicss**: `any` #### customSettings.xht > **xht**: `any` #### customSettings.xml > **xml**: `any` #### cwasm > **cwasm**: `undefined` \| `string` #### cwasm-selector > **cwasm-selector**: `undefined` \| `string` #### cxx > **cxx**: `undefined` \| `string` #### cxx-selector > **cxx-selector**: `undefined` \| `string` #### delay? > `optional` **delay**: `number` Time delay (in milliseconds) following code change, after which the result page is updated (if [`autoupdate`](https://livecodes.io/docs/configuration/configuration-object#autoupdate) is `true`) and/or the project is saved (if [`autosave`](https://livecodes.io/docs/configuration/configuration-object#autosave) is `true`). ##### Default ```ts 1500 ``` #### description? > `optional` **description**: `string` Project description. Used in [project](https://livecodes.io/docs/features/projects) search and [result page](https://livecodes.io/docs/features/result) description meta tag. ##### Default ```ts "" ``` #### diagram > **diagram**: `undefined` \| `string` #### diagram-selector > **diagram-selector**: `undefined` \| `string` #### diagrams > **diagrams**: `undefined` \| `string` #### diagrams-selector > **diagrams-selector**: `undefined` \| `string` #### disableAI? > `optional` **disableAI**: `boolean` #### dot > **dot**: `undefined` \| `string` #### dot-selector > **dot-selector**: `undefined` \| `string` #### editor? > `optional` **editor**: `"auto"` \| `"monaco"` \| `"codemirror"` \| `"codejar"` Selects the [code editor](https://livecodes.io/docs/features/editor-settings#code-editor) to use. If `undefined` (the default), Monaco editor is used on desktop, CodeMirror is used on mobile and in `simple` mode, while CodeJar is used in `codeblock` mode, in `lite` mode and in `readonly` playgrounds. If set to `auto`, Monaco editor is used on desktop and CodeMirror is used on mobile regardless of other settings. ##### Default ```ts undefined ``` #### editorMode? > `optional` **editorMode**: `"vim"` \| `"emacs"` Sets [editor mode](https://livecodes.io/docs/features/editor-settings#editor-modes). #### editorTheme? > `optional` **editorTheme**: `string` \| [`EditorTheme`](../internal/type-aliases/EditorTheme.md)[] Sets the [code editor](https://livecodes.io/docs/features/editor-settings) themes. See docs for [editor themes](https://livecodes.io/docs/configuration/configuration-object#editortheme) for details. ##### Examples ```ts "vs" ``` ```ts "monaco:twilight, codemirror:one-dark" ``` ```ts ["vs@light"] ``` ```ts ["vs@light", "vs-dark@dark"] ``` ```ts ["monaco:vs@light", "codemirror:github-light@light", "dracula@dark"] ``` #### edn > **edn**: `undefined` \| `string` #### edn-selector > **edn-selector**: `undefined` \| `string` #### ejs > **ejs**: `undefined` \| `string` #### ejs-selector > **ejs-selector**: `undefined` \| `string` #### embed? > `optional` **embed**: `boolean` #### emmet? > `optional` **emmet**: `boolean` Enables [Emmet](https://livecodes.io/docs/features/editor-settings#emmet). ##### Default ```ts true ``` #### enableAI? > `optional` **enableAI**: `boolean` If `true`, [AI code assistant](https://livecodes.io/docs/features/ai) is enabled. ##### Default ```ts false ``` #### es > **es**: `undefined` \| `string` #### es-selector > **es-selector**: `undefined` \| `string` #### eta > **eta**: `undefined` \| `string` #### eta-selector > **eta-selector**: `undefined` \| `string` #### fennel > **fennel**: `undefined` \| `string` #### fennel-selector > **fennel-selector**: `undefined` \| `string` #### files? > `optional` **files**: `string` #### flow > **flow**: `undefined` \| `string` #### flow-selector > **flow-selector**: `undefined` \| `string` #### fnl > **fnl**: `undefined` \| `string` #### fnl-selector > **fnl-selector**: `undefined` \| `string` #### foldRegions? > `optional` **foldRegions**: `boolean` When set to `true`, regions marked by `#region` and `#endregion` comments are folded when the project is loaded. ##### Default ```ts false ``` #### fontFamily? > `optional` **fontFamily**: `string` Sets the [code editor](https://livecodes.io/docs/features/editor-settings) font family. #### fontSize? > `optional` **fontSize**: `number` Sets the font size. If `undefined` (the default), the font size is set to 14 for the full app and 12 for [embeds](https://livecodes.io/docs/features/embeds). ##### Default ```ts undefined ``` #### formatOnsave? > `optional` **formatOnsave**: `boolean` If `true`, the code is automatically [formatted](https://livecodes.io/docs/features/code-format) on saving the project. ##### Default ```ts false ``` #### gleam > **gleam**: `undefined` \| `string` #### gleam-selector > **gleam-selector**: `undefined` \| `string` #### go > **go**: `undefined` \| `string` #### go-selector > **go-selector**: `undefined` \| `string` #### golang > **golang**: `undefined` \| `string` #### golang-selector > **golang-selector**: `undefined` \| `string` #### graph > **graph**: `undefined` \| `string` #### graph-selector > **graph-selector**: `undefined` \| `string` #### h > **h**: `undefined` \| `string` #### h-selector > **h-selector**: `undefined` \| `string` #### haml > **haml**: `undefined` \| `string` #### haml-selector > **haml-selector**: `undefined` \| `string` #### handlebars > **handlebars**: `undefined` \| `string` #### handlebars-selector > **handlebars-selector**: `undefined` \| `string` #### hbs > **hbs**: `undefined` \| `string` #### hbs-selector > **hbs-selector**: `undefined` \| `string` #### head? > `optional` **head**: `string` Content added to the [result page](https://livecodes.io/docs/features/result) `
` element. ##### Default ```ts '\n' ``` #### headless? > `optional` **headless**: `boolean` If `true`, the playground is loaded in [headless mode](https://livecodes.io/docs/sdk/headless). ##### Default ```ts false ``` #### hpp > **hpp**: `undefined` \| `string` #### hpp-selector > **hpp-selector**: `undefined` \| `string` #### htm > **htm**: `undefined` \| `string` #### htm-selector > **htm-selector**: `undefined` \| `string` #### html > **html**: `undefined` \| `string` #### html-selector > **html-selector**: `undefined` \| `string` #### htmlAttrs? > `optional` **htmlAttrs**: `string` \| `Record`\<`string`, `string`\> Attributes added to the [result page](https://livecodes.io/docs/features/result) `` element. It can be an object or a string. ##### Example ```ts { lang: "en", class: "dark" } 'lang="en" class="dark"' ``` #### ii > **ii**: `undefined` \| `string` #### ii-selector > **ii-selector**: `undefined` \| `string` #### imba > **imba**: `undefined` \| `string` #### imba-selector > **imba-selector**: `undefined` \| `string` #### import? > `optional` **import**: `string` A resource to [import](https://livecodes.io/docs/features/import) (from any of the supported [sources](https://livecodes.io/docs/features/import#sources)). #### imports? > `optional` **imports**: `object` Allows specifying custom [import maps](https://github.com/WICG/import-maps) for [module imports](https://livecodes.io/docs/features/module-resolution#custom-module-resolution). **Example** Setting `imports` like this: ```js "imports": { "moment": "https://cdn.jsdelivr.net/npm/moment@2.29.4/dist/moment.js" } ``` results in the following import map: ```html ``` See docs for [Imports](https://livecodes.io/docs/configuration/configuration-object#imports) and [Custom Module Resolution](https://livecodes.io/docs/features/module-resolution/#custom-module-resolution) ##### Index Signature \[`key`: `string`\]: `string` #### ixx > **ixx**: `undefined` \| `string` #### ixx-selector > **ixx-selector**: `undefined` \| `string` #### jade > **jade**: `undefined` \| `string` #### jade-selector > **jade-selector**: `undefined` \| `string` #### java > **java**: `undefined` \| `string` #### java-selector > **java-selector**: `undefined` \| `string` #### javascript > **javascript**: `undefined` \| `string` #### javascript-selector > **javascript-selector**: `undefined` \| `string` #### jinja > **jinja**: `undefined` \| `string` #### jinja-selector > **jinja-selector**: `undefined` \| `string` #### jl > **jl**: `undefined` \| `string` #### jl-selector > **jl-selector**: `undefined` \| `string` #### js > **js**: `undefined` \| `string` #### js-selector > **js-selector**: `undefined` \| `string` #### json > **json**: `undefined` \| `string` #### json-selector > **json-selector**: `undefined` \| `string` #### jsx > **jsx**: `undefined` \| `string` #### jsx-selector > **jsx-selector**: `undefined` \| `string` #### julia > **julia**: `undefined` \| `string` #### julia-selector > **julia-selector**: `undefined` \| `string` #### lang? > `optional` **lang**: [`Language`](../type-aliases/Language.md) #### language? > `optional` **language**: [`Language`](../type-aliases/Language.md) #### languages? > `optional` **languages**: `string` #### layout? > `optional` **layout**: `"horizontal"` \| `"vertical"` \| `"responsive"` Sets the app layout to horizontal or vertical. If set to `"responsive"` (the default) or `undefined`, the layout is vertical in small screens when the playground height is larger than its width, otherwise horizontal. ##### Default ```ts "responsive" ``` #### less > **less**: `undefined` \| `string` #### less-selector > **less-selector**: `undefined` \| `string` #### lineNumbers? > `optional` **lineNumbers**: `boolean` \| `"relative"` Show line numbers in [code editor](https://livecodes.io/docs/features/editor-settings). ##### Default ```ts true ``` #### liquid > **liquid**: `undefined` \| `string` #### liquid-selector > **liquid-selector**: `undefined` \| `string` #### liquidjs > **liquidjs**: `undefined` \| `string` #### liquidjs-selector > **liquidjs-selector**: `undefined` \| `string` #### lisp > **lisp**: `undefined` \| `string` #### lisp-selector > **lisp-selector**: `undefined` \| `string` #### ~~lite?~~ > `optional` **lite**: `boolean` ##### Deprecated Use `{ config: { mode: "lite" } }` instead If `true`, the playground is loaded in [lite mode](https://livecodes.io/docs/features/lite). ##### Default ```ts false ``` #### livescript > **livescript**: `undefined` \| `string` #### livescript-selector > **livescript-selector**: `undefined` \| `string` #### loading? > `optional` **loading**: `"click"` \| `"eager"` \| `"lazy"` Sets how the playground loads: - `"eager"`: The playground loads immediately. - `"lazy"`: A playground embedded low down in the page will not load until the user scrolls so that it approaches the viewport. - `"click"`: The playground does not load automatically. Instead, a "Click-to-load" screen is shown. ##### Default ```ts "lazy" ``` #### ls > **ls**: `undefined` \| `string` #### ls-selector > **ls-selector**: `undefined` \| `string` #### lua > **lua**: `undefined` \| `string` #### lua-selector > **lua-selector**: `undefined` \| `string` #### lua-wasm > **lua-wasm**: `undefined` \| `string` #### lua-wasm-selector > **lua-wasm-selector**: `undefined` \| `string` #### luawasm > **luawasm**: `undefined` \| `string` #### luawasm-selector > **luawasm-selector**: `undefined` \| `string` #### malina > **malina**: `undefined` \| `string` #### malina-selector > **malina-selector**: `undefined` \| `string` #### malinajs > **malinajs**: `undefined` \| `string` #### malinajs-selector > **malinajs-selector**: `undefined` \| `string` #### markdown > **markdown**: `undefined` \| `string` #### markdown-selector > **markdown-selector**: `undefined` \| `string` #### markup? > `optional` **markup**: `object` An object that configures the language and content of the markup editor. See [docs](https://livecodes.io/docs/configuration/configuration-object/#markup) for details. ##### Default ```ts { language: "html", content: "" } ``` #### markup.content? > `optional` **content**: `string` The initial content of the code editor. ##### Default ```ts "" ``` #### markup.contentUrl? > `optional` **contentUrl**: `string` A URL to load `content` from. It has to be a valid URL that is CORS-enabled. The URL is only fetched if `content` property had no value. #### markup.foldedLines? > `optional` **foldedLines**: `object`[] Lines that get folded when the editor loads. This can be used for less relevant content. ##### Example ```ts [{ from: 5, to: 8 }, { from: 15, to: 20 }] ``` #### markup.hiddenContent? > `optional` **hiddenContent**: `string` Hidden content that gets evaluated without being visible in the code editor. This can be useful in embedded playgrounds (e.g. for adding helper functions, utilities or tests) #### markup.hiddenContentUrl? > `optional` **hiddenContentUrl**: `string` A URL to load `hiddenContent` from. It has to be a valid URL that is CORS-enabled. The URL is only fetched if `hiddenContent` property had no value. #### markup.hideTitle? > `optional` **hideTitle**: `boolean` If `true`, the title of the code editor is hidden, however its code is still evaluated. This can be useful in embedded playgrounds (e.g. for hiding unnecessary code). #### markup.language > **language**: [`Language`](../type-aliases/Language.md) A language name, extension or alias (as defined in [language documentations](https://livecodes.io/docs/languages/)). For the list of supported values, see [Language](https://livecodes.io/docs/api/type-aliases/Language) #### markup.order? > `optional` **order**: `number` The order of the editor in the UI. ##### Default ```ts 0 ``` #### markup.position? > `optional` **position**: [`EditorPosition`](../internal/interfaces/EditorPosition.md) The initial position of the cursor in the code editor. ##### Example ```ts {lineNumber: 5, column: 10} ``` #### markup.selector? > `optional` **selector**: `string` A CSS selector to load content from [DOM import](https://livecodes.io/docs/features/import#import-code-from-dom). #### markup.title? > `optional` **title**: `string` If set, this is used as the title of the editor in the UI, overriding the default title set to the language name (e.g. `"Python"` can be used instead of `"Py (Wasm)"`). #### md > **md**: `undefined` \| `string` #### md-selector > **md-selector**: `undefined` \| `string` #### mdown > **mdown**: `undefined` \| `string` #### mdown-selector > **mdown-selector**: `undefined` \| `string` #### mdx > **mdx**: `undefined` \| `string` #### mdx-selector > **mdx-selector**: `undefined` \| `string` #### mjml > **mjml**: `undefined` \| `string` #### mjml-selector > **mjml-selector**: `undefined` \| `string` #### mkdn > **mkdn**: `undefined` \| `string` #### mkdn-selector > **mkdn-selector**: `undefined` \| `string` #### ml > **ml**: `undefined` \| `string` #### ml-selector > **ml-selector**: `undefined` \| `string` #### mli > **mli**: `undefined` \| `string` #### mli-selector > **mli-selector**: `undefined` \| `string` #### mode? > `optional` **mode**: `"focus"` \| `"full"` \| `"result"` \| `"editor"` \| `"lite"` \| `"simple"` \| `"codeblock"` Sets the [display mode](https://livecodes.io/docs/features/display-modes). ##### Default ```ts "full" ``` #### mustache > **mustache**: `undefined` \| `string` #### mustache-selector > **mustache-selector**: `undefined` \| `string` #### new? > `optional` **new**: `""` #### njk > **njk**: `undefined` \| `string` #### njk-selector > **njk-selector**: `undefined` \| `string` #### no-defaults? > `optional` **no-defaults**: `boolean` #### nunjucks > **nunjucks**: `undefined` \| `string` #### nunjucks-selector > **nunjucks-selector**: `undefined` \| `string` #### ocaml > **ocaml**: `undefined` \| `string` #### ocaml-selector > **ocaml-selector**: `undefined` \| `string` #### params? > `optional` **params**: \{ appUrl?: string \| undefined; params?: ... \| undefined; config?: string \| (Partial\