The options to create an editor.




Optional acceptSuggestionOnCommitCharacter

acceptSuggestionOnCommitCharacter: boolean

Accept suggestions on provider defined characters. Defaults to true.

Optional acceptSuggestionOnEnter

acceptSuggestionOnEnter: boolean

Accept suggestions on ENTER. Defaults to true.

Optional ariaLabel

ariaLabel: string

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

Optional autoClosingBrackets

autoClosingBrackets: boolean

Enable auto closing brackets. Defaults to true.

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 codeLens

codeLens: boolean

Show code lens Defaults to true.

Optional contextmenu

contextmenu: boolean

Enable custom contextmenu. Defaults to true.

Optional cursorBlinking

cursorBlinking: string

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

Optional cursorStyle

cursorStyle: string

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

Optional disableMonospaceOptimizations

disableMonospaceOptimizations: boolean

Disable the optimizations for monospace fonts. Defaults to false.

Optional disableTranslate3d

disableTranslate3d: boolean

Disable the use of translate3d. Defaults to false.

Optional emptySelectionClipboard

emptySelectionClipboard: boolean

Copying without a selection copies the current line.

Optional experimentalScreenReader

experimentalScreenReader: boolean

Enable experimental screen reader support. Defaults to true.

Optional fixedOverflowWidgets

fixedOverflowWidgets: boolean

Display overflow widgets as fixed. Defaults to false.

Optional folding

folding: boolean

Enable code folding Defaults to true in vscode and to false in monaco-editor.

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 hideCursorInOverviewRuler

hideCursorInOverviewRuler: boolean

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

Optional hover

hover: boolean

Enable hover. Defaults to true.

Optional iconsInSuggestions

iconsInSuggestions: boolean

Render icons in suggestions box. Defaults to true.

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 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: LineNumbersOption

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 model

model: IModel

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 overviewRulerLanes

overviewRulerLanes: number

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

Optional parameterHints

parameterHints: boolean

Enables parameter hints

Optional quickSuggestions

quickSuggestions: boolean

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 renderIndentGuides

renderIndentGuides: boolean

Enable rendering of indent guides. Defaults to false.

Optional renderLineHighlight

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

Enable rendering of current line highlight. Defaults to all.

Optional renderWhitespace

renderWhitespace: "none" | "boundary" | "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 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 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 if wrappingColumn is -1. Defaults to -1 if wrappingColumn is >= 0. Use -1 to never stop rendering

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 tabCompletion

tabCompletion: boolean

Enable tab completion. Defaults to 'false'

Optional theme

theme: string

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.

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: boolean

Control the alternate style of viewport wrapping. When set to true viewport wrapping is used only when the window width is less than the number of columns specified in the wrappingColumn property. Has no effect if wrappingColumn is not a positive number. Defaults to false.

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 wrappingColumn

wrappingColumn: number

Control the wrapping strategy of the editor. Using -1 means no wrapping whatsoever. Using 0 means viewport width wrapping (ajusts with the resizing of the editor). Using a positive number means wrapping after a fixed number of characters. Defaults to 300.

Optional wrappingIndent

wrappingIndent: string

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