The options to create an editor.





Optional acceptSuggestionOnCommitCharacter

acceptSuggestionOnCommitCharacter: boolean

Accept suggestions on provider defined characters. Defaults to true.

Optional acceptSuggestionOnEnter

acceptSuggestionOnEnter: boolean | "on" | "smart" | "off"

Accept suggestions on ENTER. Defaults to 'on'.

Optional accessibilityHelpUrl

accessibilityHelpUrl: string

An URL to open when Ctrl+H (Windows and Linux) or Cmd+H (OSX) is pressed in the accessibility help dialog in the editor.

Defaults to ""

Optional accessibilitySupport

accessibilitySupport: "auto" | "off" | "on"

Configure the editor's accessibility support. Defaults to 'auto'. It is best to leave this to 'auto'.

Optional ariaLabel

ariaLabel: string

The aria label for the editor's textarea (when it is focused).

Optional autoClosingBrackets

autoClosingBrackets: EditorAutoClosingStrategy

Options for auto closing brackets. Defaults to language defined behavior.

Optional autoClosingOvertype

Options for typing over closing quotes or brackets.

Optional autoClosingQuotes

autoClosingQuotes: EditorAutoClosingStrategy

Options for auto closing quotes. Defaults to language defined behavior.

Optional autoIndent

autoIndent: boolean

Enable auto indentation adjustment. Defaults to false.

Optional autoSurround

Options for auto surrounding. Defaults to always allowing auto surrounding.

Optional automaticLayout

automaticLayout: boolean

Enable that the editor will install an interval to check if its container dom node size has changed. Enabling this might have a severe performance impact. Defaults to false.

Optional codeActionsOnSave

codeActionsOnSave: ICodeActionsOnSaveOptions

Code action kinds to be run on save.

Optional codeActionsOnSaveTimeout

codeActionsOnSaveTimeout: number

Timeout for running code actions on save.

Optional codeLens

codeLens: boolean

Show code lens Defaults to true.

Optional colorDecorators

colorDecorators: boolean

Enable inline color decorators and color picker rendering.

Optional contextmenu

contextmenu: boolean

Enable custom contextmenu. Defaults to true.

Optional copyWithSyntaxHighlighting

copyWithSyntaxHighlighting: boolean

Syntax highlighting is copied.

Optional cursorBlinking

cursorBlinking: string

Control the cursor animation style, possible values are 'blink', 'smooth', 'phase', 'expand' and 'solid'. Defaults to 'blink'.

Optional cursorSmoothCaretAnimation

cursorSmoothCaretAnimation: boolean

Enable smooth caret animation. Defaults to false.

Optional cursorStyle

cursorStyle: string

Control the cursor style, either 'block' or 'line'. Defaults to 'line'.

Optional cursorSurroundingLines

cursorSurroundingLines: number

Controls the minimal number of visible leading and trailing lines surrounding the cursor. Defaults to 0.

Optional cursorWidth

cursorWidth: number

Control the width of the cursor when cursorStyle is set to 'line'

Optional disableLayerHinting

disableLayerHinting: boolean

Disable the use of will-change for the editor margin and lines layers. The usage of will-change acts as a hint for browsers to create an extra layer. Defaults to false.

Optional disableMonospaceOptimizations

disableMonospaceOptimizations: boolean

Disable the optimizations for monospace fonts. Defaults to false.

Optional dragAndDrop

dragAndDrop: boolean

Controls if the editor should allow to move selections via drag and drop. Defaults to false.

Optional emptySelectionClipboard

emptySelectionClipboard: boolean

Copying without a selection copies the current line.

Optional extraEditorClassName

extraEditorClassName: string

Class name to be added to the editor.

Optional fastScrollSensitivity

fastScrollSensitivity: number

FastScrolling mulitplier speed when pressing Alt Defaults to 5.

Optional find

Control the behavior of the find widget.

Optional fixedOverflowWidgets

fixedOverflowWidgets: boolean

Display overflow widgets as fixed. Defaults to false.

Optional folding

folding: boolean

Enable code folding Defaults to true.

Optional foldingStrategy

foldingStrategy: "auto" | "indentation"

Selects the folding strategy. 'auto' uses the strategies contributed for the current document, 'indentation' uses the indentation based folding strategy. Defaults to 'auto'.

Optional fontFamily

fontFamily: string

The font family

Optional fontLigatures

fontLigatures: boolean

Enable font ligatures. Defaults to false.

Optional fontSize

fontSize: number

The font size

Optional fontWeight

fontWeight: "normal" | "bold" | "bolder" | "lighter" | "initial" | "inherit" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900"

The font weight

Optional formatOnPaste

formatOnPaste: boolean

Enable format on paste. Defaults to false.

Optional formatOnType

formatOnType: boolean

Enable format on type. Defaults to false.

Optional glyphMargin

glyphMargin: boolean

Enable the rendering of the glyph margin. Defaults to true in vscode and to false in monaco-editor.

Optional gotoLocation

gotoLocation: IGotoLocationOptions

Optional hideCursorInOverviewRuler

hideCursorInOverviewRuler: boolean

Should the cursor be hidden in the overview ruler. Defaults to false.

Optional highlightActiveIndentGuide

highlightActiveIndentGuide: boolean

Enable highlighting of the active indent guide. Defaults to true.

Optional hover

Configure the editor's hover.

Optional language

language: string

The initial language of the auto created model in the editor. To not create automatically a model, use model: null.

Optional letterSpacing

letterSpacing: number

The letter spacing

Optional lightbulb

Control the behavior and rendering of the code action lightbulb.

Optional lineDecorationsWidth

lineDecorationsWidth: number | string

The width reserved for line decorations (in px). Line decorations are placed between line numbers and the editor content. You can pass in a string in the format floating point followed by "ch". e.g. 1.3ch. Defaults to 10.

Optional lineHeight

lineHeight: number

The line height

Optional lineNumbers

lineNumbers: "on" | "off" | "relative" | "interval" | function

Control the rendering of line numbers. If it is a function, it will be invoked when rendering a line number and the return value will be rendered. Otherwise, if it is a truey, line numbers will be rendered normally (equivalent of using an identity function). Otherwise, line numbers will not be rendered. Defaults to true.

Optional lineNumbersMinChars

lineNumbersMinChars: number

Control the width of line numbers, by reserving horizontal space for rendering at least an amount of digits. Defaults to 5.

Optional links

links: boolean

Enable detecting links and making them clickable. Defaults to true.

Optional matchBrackets

matchBrackets: boolean

Enable highlighting of matching brackets. Defaults to true.

Optional minimap

Control the behavior and rendering of the minimap.

Optional model

model: ITextModel | null

The initial model associated with this code editor.

Optional mouseWheelScrollSensitivity

mouseWheelScrollSensitivity: number

A multiplier to be used on the deltaX and deltaY of mouse wheel scroll events. Defaults to 1.

Optional mouseWheelZoom

mouseWheelZoom: boolean

Zoom the font in the editor when using the mouse wheel in combination with holding Ctrl. Defaults to false.

Optional multiCursorMergeOverlapping

multiCursorMergeOverlapping: boolean

Merge overlapping selections. Defaults to true

Optional multiCursorModifier

multiCursorModifier: "ctrlCmd" | "alt"

The modifier to be used to add multiple cursors with the mouse. Defaults to 'alt'

Optional occurrencesHighlight

occurrencesHighlight: boolean

Enable semantic occurrences highlight. Defaults to true.

Optional overviewRulerBorder

overviewRulerBorder: boolean

Controls if a border should be drawn around the overview ruler. Defaults to true.

Optional overviewRulerLanes

overviewRulerLanes: number

The number of vertical lanes the overview ruler should render. Defaults to 2.

Optional parameterHints

Parameter hint options.

Optional quickSuggestions

quickSuggestions: boolean | object

Enable quick suggestions (shadow suggestions) Defaults to true.

Optional quickSuggestionsDelay

quickSuggestionsDelay: number

Quick suggestions show delay (in ms) Defaults to 500 (ms)

Optional readOnly

readOnly: boolean

Should the editor be read only. Defaults to false.

Optional renderControlCharacters

renderControlCharacters: boolean

Enable rendering of control characters. Defaults to false.

Optional renderFinalNewline

renderFinalNewline: boolean

Render last line number when the file ends with a newline. Defaults to true.

Optional renderIndentGuides

renderIndentGuides: boolean

Enable rendering of indent guides. Defaults to true.

Optional renderLineHighlight

renderLineHighlight: "none" | "gutter" | "line" | "all"

Enable rendering of current line highlight. Defaults to all.

Optional renderWhitespace

renderWhitespace: "none" | "boundary" | "selection" | "all"

Enable rendering of whitespace. Defaults to none.

Optional revealHorizontalRightPadding

revealHorizontalRightPadding: number

When revealing the cursor, a virtual padding (px) is added to the cursor, turning it into a rectangle. This virtual padding ensures that the cursor gets revealed before hitting the edge of the viewport. Defaults to 30 (px).

Optional roundedSelection

roundedSelection: boolean

Render the editor selection with rounded borders. Defaults to true.

Optional rulers

rulers: number[]

Render vertical lines at the specified columns. Defaults to empty array.

Optional scrollBeyondLastColumn

scrollBeyondLastColumn: number

Enable that scrolling can go beyond the last column by a number of columns. Defaults to 5.

Optional scrollBeyondLastLine

scrollBeyondLastLine: boolean

Enable that scrolling can go one screen size after the last line. Defaults to true.

Optional scrollbar

Control the behavior and rendering of the scrollbars.

Optional selectOnLineNumbers

selectOnLineNumbers: boolean

Should the corresponding line be selected when clicking on the line number? Defaults to true.

Optional selectionClipboard

selectionClipboard: boolean

Enable Linux primary clipboard. Defaults to true.

Optional selectionHighlight

selectionHighlight: boolean

Enable selection highlight. Defaults to true.

Optional showFoldingControls

showFoldingControls: "always" | "mouseover"

Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter. Defaults to 'mouseover'.

Optional showUnused

showUnused: boolean

Controls fading out of unused variables.

Optional smoothScrolling

smoothScrolling: boolean

Enable that the editor animates scrolling to a position. Defaults to false.

Optional snippetSuggestions

snippetSuggestions: "top" | "bottom" | "inline" | "none"

Enable snippet suggestions. Default to 'true'.

Optional stopRenderingLineAfter

stopRenderingLineAfter: number

Performance guard: Stop rendering a line after x characters. Defaults to 10000. Use -1 to never stop rendering

Optional suggest

Suggest options.

Optional suggestFontSize

suggestFontSize: number

The font size for the suggest widget. Defaults to the editor font size.

Optional suggestLineHeight

suggestLineHeight: number

The line height for the suggest widget. Defaults to the editor line height.

Optional suggestOnTriggerCharacters

suggestOnTriggerCharacters: boolean

Enable the suggestion box to pop-up on trigger characters. Defaults to true.

Optional suggestSelection

suggestSelection: "first" | "recentlyUsed" | "recentlyUsedByPrefix"

The history mode for suggestions.

Optional tabCompletion

tabCompletion: boolean | "on" | "off" | "onlySnippets"

Enable tab completion.

Optional theme

theme: string

Initial theme to be used for rendering. The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. You can create custom themes via monaco.editor.defineTheme. To switch a theme, use monaco.editor.setTheme

Optional useTabStops

useTabStops: boolean

Inserting and deleting whitespace follows tab stops.

Optional value

value: string

The initial value of the auto created model in the editor. To not create automatically a model, use model: null.

Optional wordBasedSuggestions

wordBasedSuggestions: boolean

Enable word based suggestions. Defaults to 'true'

Optional wordSeparators

wordSeparators: string

A string containing the word separators used when doing word navigation. Defaults to `~!@#$%^&*()-=+[{]}\|;:'",.<>/?

Optional wordWrap

wordWrap: "off" | "on" | "wordWrapColumn" | "bounded"

Control the wrapping of the editor. When wordWrap = "off", the lines will never wrap. When wordWrap = "on", the lines will wrap at the viewport width. When wordWrap = "wordWrapColumn", the lines will wrap at wordWrapColumn. When wordWrap = "bounded", the lines will wrap at min(viewport width, wordWrapColumn). Defaults to "off".

Optional wordWrapBreakAfterCharacters

wordWrapBreakAfterCharacters: string

Configure word wrapping characters. A break will be introduced after these characters. Defaults to ' \t})]?|&,;'.

Optional wordWrapBreakBeforeCharacters

wordWrapBreakBeforeCharacters: string

Configure word wrapping characters. A break will be introduced before these characters. Defaults to '{([+'.

Optional wordWrapBreakObtrusiveCharacters

wordWrapBreakObtrusiveCharacters: string

Configure word wrapping characters. A break will be introduced after these characters only if no wordWrapBreakBeforeCharacters or wordWrapBreakAfterCharacters were found. Defaults to '.'.

Optional wordWrapColumn

wordWrapColumn: number

Control the wrapping of the editor. When wordWrap = "off", the lines will never wrap. When wordWrap = "on", the lines will wrap at the viewport width. When wordWrap = "wordWrapColumn", the lines will wrap at wordWrapColumn. When wordWrap = "bounded", the lines will wrap at min(viewport width, wordWrapColumn). Defaults to 80.

Optional wordWrapMinified

wordWrapMinified: boolean

Force word wrapping when the text appears to be of a minified/generated file. Defaults to true.

Optional wrappingIndent

wrappingIndent: string

Control indentation of wrapped lines. Can be: 'none', 'same', 'indent' or 'deepIndent'. Defaults to 'same' in vscode and to 'none' in monaco-editor.