Interface: UserConfig
_internal.UserConfig
Hierarchy
↳
UserConfig
↳↳
Config
Properties
autosave
• autosave: boolean
If true
, the project is automatically saved on code change,
after time delay.
Default
false
Defined in
autotest
• autotest: boolean
If true
, the project is watched for code changes which trigger tests to auto-run.
Default
false
Defined in
autoupdate
• autoupdate: boolean
If true
, the result page is automatically updated on code change,
after time delay.
Default
true
Defined in
closeBrackets
• closeBrackets: boolean
Use auto-complete to close brackets and quotes.
Default
true
Inherited from
Defined in
delay
• delay: number
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
).
Default
1500
Defined in
editor
• editor: undefined
| "monaco"
| "codemirror"
| "codejar"
Selects the code editor to use.
If undefined
(the default), Monaco editor is used on desktop, CodeMirror is used on mobile
and CodeJar is used in codeblocks, in lite mode and in readonly playgrounds.
Default
undefined
Inherited from
Defined in
editorMode
• editorMode: undefined
| "vim"
| "emacs"
Sets editor mode.
Inherited from
Defined in
editorTheme
• editorTheme: undefined
| string
| EditorTheme
[]
Sets the code editor themes.
See docs for editor themes for details.
Example
"vs"
Example
"monaco:twilight, codemirror:one-dark"
Example
["vs@light"]
Example
["vs@light", "vs-dark@dark"]
Example
["monaco:vs@light", "codemirror:github-light@light", "dracula@dark"]
Inherited from
Defined in
emmet
• emmet: boolean
Enables Emmet.
Default
true
Inherited from
Defined in
enableAI
• enableAI: boolean
If true
, AI code assistant is enabled.
Default
false
Inherited from
Defined in
fontFamily
• fontFamily: undefined
| string
Sets the code editor font family.
Inherited from
Defined in
fontSize
• fontSize: undefined
| number
Sets the code editor font size.
If undefined
(the default), the font size is set to 14 for the full app and 12 for embeds.
Default
undefined
Inherited from
Defined in
formatOnsave
• formatOnsave: boolean
If true
, the code is automatically formatted on saving the project.
Default
false
Defined in
layout
• layout: undefined
| "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
"responsive"
Defined in
lineNumbers
• lineNumbers: boolean
Show line numbers in code editor.
Default
true
Inherited from
Defined in
recoverUnsaved
• recoverUnsaved: boolean
Enables recovering last unsaved project when the app is reopened.
Default
true
Defined in
semicolons
• semicolons: boolean
Configures Prettier code formatter to use semi-colons.
Default
true
Inherited from
Defined in
showSpacing
• showSpacing: boolean
Enables showing element spacing in the result page.
Default
false
Defined in
singleQuote
• singleQuote: boolean
Configures Prettier code formatter to use single quotes instead of double quotes.
Default
false
Inherited from
Defined in
tabSize
• tabSize: number
The number of spaces per indentation-level.
Also used in code formatting.
Default
2
Inherited from
Defined in
theme
• theme: Theme
Sets the app theme to light/dark mode.
Default
"dark"
Inherited from
Defined in
trailingComma
• trailingComma: boolean
Configures Prettier code formatter to use trailing commas.
Default
true
Inherited from
Defined in
useTabs
• useTabs: boolean
If true
, lines are indented with tabs instead of spaces.
Also used in code formatting.
Default
false
Inherited from
Defined in
welcome
• welcome: boolean
If true
, the welcome screen is displayed when the app loads.
Defined in
wordWrap
• wordWrap: boolean
Enables word-wrap for long lines.
Default
false