Editor interface defines the configuration for individual code editors (markup, style, script) in LiveCodes.
Editor Interface
Properties
language
A language name, extension or alias.See Language Configuration for the list of supported values.
content
The initial content of the code editor.
contentUrl
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.hiddenContent
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).
hiddenContentUrl
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.foldedLines
Lines that get folded when the editor loads.This can be used for less relevant content.
title
If set, this is used as the title of the editor in the UI, overriding the default title set to the language name.For example,
"Python" can be used instead of "Py (Wasm)".hideTitle
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).order
The order of the editor in the UI.
selector
A CSS selector to load content from DOM import.See DOM Import documentation for details.
position
The initial position of the cursor in the code editor.
EditorConfig Interface
Additional configuration for the code editor itself:editor
Selects the code editor to use.
undefined(default): Monaco on desktop, CodeMirror on mobile, CodeJar incodeblockmode andreadonlyplaygrounds"auto": Monaco on desktop, CodeMirror on mobile regardless of other settings"monaco": Force Monaco editor"codemirror": Force CodeMirror editor"codejar": Force CodeJar editor
theme
Sets the app theme to light/dark mode.
themeColor
Sets the app theme color.
editorTheme
Sets the code editor themes.Can be a single theme name or an array of themes with mode indicators.
fontFamily
Sets the code editor font family.
fontSize
Sets the font size. If
undefined (the default), the font size is set to 14 for the full app and 12 for embeds.useTabs
If
true, lines are indented with tabs instead of spaces.Also used in code formatting.tabSize
The number of spaces per indentation-level.Also used in code formatting.
lineNumbers
Show line numbers in code editor.Can be
true, false, or "relative" for relative line numbers.wordWrap
Enables word-wrap for long lines.
foldRegions
When set to
true, regions marked by #region and #endregion comments are folded when the project is loaded.closeBrackets
Use auto-complete to close brackets and quotes.
minimap
Enables minimap in code editor.
emmet
Enables Emmet.
editorMode
Sets editor mode (Vim or Emacs keybindings).