Skip to main content

Interface: UserConfig

_internal.UserConfig

Hierarchy

Properties

autosave

autosave: boolean

If true, the project is automatically saved on code change, after time delay.

Default

false

Defined in

models.ts:634


autotest

autotest: boolean

If true, the project is watched for code changes which trigger tests to auto-run.

Default

false

Defined in

models.ts:640


autoupdate

autoupdate: boolean

If true, the result page is automatically updated on code change, after time delay.

Default

true

Defined in

models.ts:627


closeBrackets

closeBrackets: boolean

Use auto-complete to close brackets and quotes.

Default

true

Inherited from

EditorConfig.closeBrackets

Defined in

models.ts:757


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

models.ts:648


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

EditorConfig.editor

Defined in

models.ts:691


editorMode

editorMode: undefined | "vim" | "emacs"

Sets editor mode.

Inherited from

EditorConfig.editorMode

Defined in

models.ts:768


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

EditorConfig.editorTheme

Defined in

models.ts:710


emmet

emmet: boolean

Enables Emmet.

Default

true

Inherited from

EditorConfig.emmet

Defined in

models.ts:763


enableAI

enableAI: boolean

If true, AI code assistant is enabled.

Default

false

Inherited from

EditorConfig.enableAI

Defined in

models.ts:774


fontFamily

fontFamily: undefined | string

Sets the code editor font family.

Inherited from

EditorConfig.fontFamily

Defined in

models.ts:715


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

EditorConfig.fontSize

Defined in

models.ts:723


formatOnsave

formatOnsave: boolean

If true, the code is automatically formatted on saving the project.

Default

false

Defined in

models.ts:654


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

models.ts:663


lineNumbers

lineNumbers: boolean

Show line numbers in code editor.

Default

true

Inherited from

EditorConfig.lineNumbers

Defined in

models.ts:745


recoverUnsaved

recoverUnsaved: boolean

Enables recovering last unsaved project when the app is reopened.

Default

true

Defined in

models.ts:669


semicolons

semicolons: boolean

Configures Prettier code formatter to use semi-colons.

Default

true

Inherited from

FormatterConfig.semicolons

Defined in

models.ts:794


showSpacing

showSpacing: boolean

Enables showing element spacing in the result page.

Default

false

Defined in

models.ts:675


singleQuote

singleQuote: boolean

Configures Prettier code formatter to use single quotes instead of double quotes.

Default

false

Inherited from

FormatterConfig.singleQuote

Defined in

models.ts:799


tabSize

tabSize: number

The number of spaces per indentation-level.

Also used in code formatting.

Default

2

Inherited from

FormatterConfig.tabSize

Defined in

models.ts:739


theme

theme: Theme

Sets the app theme to light/dark mode.

Default

"dark"

Inherited from

EditorConfig.theme

Defined in

models.ts:697


trailingComma

trailingComma: boolean

Configures Prettier code formatter to use trailing commas.

Default

true

Inherited from

FormatterConfig.trailingComma

Defined in

models.ts:805


useTabs

useTabs: boolean

If true, lines are indented with tabs instead of spaces.

Also used in code formatting.

Default

false

Inherited from

FormatterConfig.useTabs

Defined in

models.ts:731


welcome

welcome: boolean

If true, the welcome screen is displayed when the app loads.

Defined in

models.ts:680


wordWrap

wordWrap: boolean

Enables word-wrap for long lines.

Default

false

Inherited from

EditorConfig.wordWrap

Defined in

models.ts:751