• Public
  • Public/Protected
  • All

Interface IStandaloneEditorConstructionOptions

The options to create an editor.





acceptSuggestionOnCommitCharacter?: boolean

Accept suggestions on provider defined characters. Defaults to true.

acceptSuggestionOnEnter?: "on" | "off" | "smart"

Accept suggestions on ENTER. Defaults to 'on'.

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.

accessibilityPageSize?: number

Controls the number of lines in the editor that can be read out by a screen reader

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

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

ariaContainerElement?: HTMLElement

Container element to use for ARIA messages. Defaults to document.body.

ariaLabel?: string

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

autoClosingBrackets?: EditorAutoClosingStrategy

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

autoClosingDelete?: EditorAutoClosingEditStrategy

Options for pressing backspace near quotes or bracket pairs.

autoClosingOvertype?: EditorAutoClosingEditStrategy

Options for typing over closing quotes or brackets.

autoClosingQuotes?: EditorAutoClosingStrategy

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

autoDetectHighContrast?: boolean

If enabled, will automatically change to high contrast theme if the OS is using a high contrast theme. Defaults to true.

autoIndent?: "none" | "advanced" | "full" | "brackets" | "keep"

Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines. Defaults to advanced.

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

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.

bracketPairColorization?: IBracketPairColorizationOptions

Configures bracket pair colorization (disabled by default).

codeActionsOnSaveTimeout?: number

Timeout for running code actions on save.

codeLens?: boolean

Show code lens Defaults to true.

codeLensFontFamily?: string

Code lens font family. Defaults to editor font family.

codeLensFontSize?: number

Code lens font size. Default to 90% of the editor font size

colorDecorators?: boolean

Enable inline color decorators and color picker rendering.

columnSelection?: boolean

Enable that the selection with the mouse and keys is doing column selection. Defaults to false.

Control the behaviour of comments in the editor.

contextmenu?: boolean

Enable custom contextmenu. Defaults to true.

copyWithSyntaxHighlighting?: boolean

Syntax highlighting is copied.

cursorBlinking?: "blink" | "smooth" | "phase" | "expand" | "solid"

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

cursorSmoothCaretAnimation?: boolean

Enable smooth caret animation. Defaults to false.

cursorStyle?: "line" | "block" | "underline" | "line-thin" | "block-outline" | "underline-thin"

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

cursorSurroundingLines?: number

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

cursorSurroundingLinesStyle?: "default" | "all"

Controls when cursorSurroundingLines should be enforced Defaults to default, cursorSurroundingLines is not enforced when cursor position is changed by mouse.

cursorWidth?: number

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

definitionLinkOpensInPeek?: boolean

Controls whether the definition link opens element in the peek widget. Defaults to false.

detectIndentation?: boolean

Controls whether tabSize and insertSpaces will be automatically detected when a file is opened based on the file contents. Defaults to true.

dimension?: IDimension

The initial editor dimension (to avoid measuring the container).

disableLayerHinting?: boolean

Disable the use of transform: translate3d(0px, 0px, 0px) for the editor margin and lines layers. The usage of transform: translate3d(0px, 0px, 0px) acts as a hint for browsers to create an extra layer. Defaults to false.

disableMonospaceOptimizations?: boolean

Disable the optimizations for monospace fonts. Defaults to false.

domReadOnly?: boolean

Should the textarea used for input use the DOM readonly attribute. Defaults to false.

dragAndDrop?: boolean

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

emptySelectionClipboard?: boolean

Copying without a selection copies the current line.

extraEditorClassName?: string

Class name to be added to the editor.

fastScrollSensitivity?: number

FastScrolling mulitplier speed when pressing Alt Defaults to 5.

Control the behavior of the find widget.

fixedOverflowWidgets?: boolean

Display overflow widgets as fixed. Defaults to false.

folding?: boolean

Enable code folding. Defaults to true.

foldingHighlight?: boolean

Enable highlight for folded regions. Defaults to true.

foldingImportsByDefault?: boolean

Auto fold imports folding regions. Defaults to true.

foldingMaximumRegions?: number

Maximum number of foldable regions. Defaults to 5000.

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'.

fontFamily?: string

The font family

fontLigatures?: string | boolean

Enable font ligatures. Defaults to false.

fontSize?: number

The font size

fontWeight?: string

The font weight

formatOnPaste?: boolean

Enable format on paste. Defaults to false.

formatOnType?: boolean

Enable format on type. Defaults to false.

glyphMargin?: boolean

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

gotoLocation?: IGotoLocationOptions

Controls the behavior of editor guides.

hideCursorInOverviewRuler?: boolean

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

Configure the editor's hover.

inDiffEditor?: boolean

This editor is used inside a diff editor.

Control the behavior and rendering of the inline hints.

inlineSuggest?: IInlineSuggestOptions
insertSpaces?: boolean

Insert spaces when pressing Tab. This setting is overridden based on the file contents when detectIndentation is on. Defaults to true.

language?: string

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

largeFileOptimizations?: boolean

Special handling for large files to disable certain memory intensive features. Defaults to true.

letterSpacing?: number

The letter spacing

Control the behavior and rendering of the code action lightbulb.

lineDecorationsWidth?: string | number

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.

lineHeight?: number

The line height

lineNumbers?: LineNumbersType

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 truthy, line numbers will be rendered normally (equivalent of using an identity function). Otherwise, line numbers will not be rendered. Defaults to on.

lineNumbersMinChars?: number

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

linkedEditing?: boolean

Enable linked editing. Defaults to false.

links?: boolean

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

matchBrackets?: "always" | "never" | "near"

Enable highlighting of matching brackets. Defaults to 'always'.

maxTokenizationLineLength?: number

Lines above this length will not be tokenized for performance reasons. Defaults to 20000.

Control the behavior and rendering of the minimap.

model?: ITextModel

The initial model associated with this code editor.

mouseStyle?: "default" | "text" | "copy"

Control the mouse pointer style, either 'text' or 'default' or 'copy' Defaults to 'text'

mouseWheelScrollSensitivity?: number

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

mouseWheelZoom?: boolean

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

multiCursorMergeOverlapping?: boolean

Merge overlapping selections. Defaults to true

multiCursorModifier?: "ctrlCmd" | "alt"

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

multiCursorPaste?: "spread" | "full"

Configure the behaviour when pasting a text with the line count equal to the cursor count. Defaults to 'spread'.

occurrencesHighlight?: boolean

Enable semantic occurrences highlight. Defaults to true.

overflowWidgetsDomNode?: HTMLElement

Place overflow widgets inside an external DOM node. Defaults to an internal DOM node.

overviewRulerBorder?: boolean

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

overviewRulerLanes?: number

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

Controls the spacing around the editor.

Parameter hint options.

peekWidgetDefaultFocus?: "tree" | "editor"

Controls whether to focus the inline editor in the peek widget by default. Defaults to false.

quickSuggestions?: boolean | IQuickSuggestionsOptions

Enable quick suggestions (shadow suggestions) Defaults to true.

quickSuggestionsDelay?: number

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

readOnly?: boolean

Should the editor be read only. See also domReadOnly. Defaults to false.

renameOnType?: boolean

deprecated, use linkedEditing instead

renderControlCharacters?: boolean

Enable rendering of control characters. Defaults to true.

renderFinalNewline?: boolean

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

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

Enable rendering of current line highlight. Defaults to all.

renderLineHighlightOnlyWhenFocus?: boolean

Control if the current line highlight should be rendered only the editor is focused. Defaults to false.

renderValidationDecorations?: "on" | "off" | "editable"

Should the editor render validation decorations. Defaults to editable.

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

Enable rendering of whitespace. Defaults to 'selection'.

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).

roundedSelection?: boolean

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

rulers?: (number | IRulerOption)[]

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

scrollBeyondLastColumn?: number

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

scrollBeyondLastLine?: boolean

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

scrollPredominantAxis?: boolean

Enable that the editor scrolls only the predominant axis. Prevents horizontal drift when scrolling vertically on a trackpad. Defaults to true.

Control the behavior and rendering of the scrollbars.

selectOnLineNumbers?: boolean

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

selectionClipboard?: boolean

Enable Linux primary clipboard. Defaults to true.

selectionHighlight?: boolean

Enable selection highlight. Defaults to true.

semanticHighlighting.enabled?: boolean | "configuredByTheme"

Controls whether the semanticHighlighting is shown for the languages that support it. true: semanticHighlighting is enabled for all themes false: semanticHighlighting is disabled for all themes 'configuredByTheme': semanticHighlighting is controlled by the current color theme's semanticHighlighting setting. Defaults to 'byTheme'.

showDeprecated?: boolean

Controls strikethrough deprecated variables.

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'.

showUnused?: boolean

Controls fading out of unused variables.

smartSelect?: ISmartSelectOptions

Smart select options.

smoothScrolling?: boolean

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

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

Enable snippet suggestions. Default to 'true'.

stablePeek?: boolean

Keep peek editors open even when double clicking their content or when hitting Escape. Defaults to false.

stickyTabStops?: boolean

Emulate selection behaviour of tab characters when using spaces for indentation. This means selection will stick to tab stops.

stopRenderingLineAfter?: number

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

suggest?: ISuggestOptions

Suggest options.

suggestFontSize?: number

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

suggestLineHeight?: number

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

suggestOnTriggerCharacters?: boolean

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

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

The history mode for suggestions.

tabCompletion?: "on" | "off" | "onlySnippets"

Enable tab completion.

tabIndex?: number

The tabindex property of the editor's textarea

tabSize?: number

The number of spaces a tab is equal to. This setting is overridden based on the file contents when detectIndentation is on. Defaults to 4.

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. NOTE: The theme might be overwritten if the OS is in high contrast mode, unless autoDetectHighContrast is set to false.

trimAutoWhitespace?: boolean

Remove trailing auto inserted whitespace. Defaults to true.

unfoldOnClickAfterEndOfLine?: boolean

Controls whether clicking on the empty content after a folded line will unfold the line. Defaults to false.

unicodeHighlight?: IUnicodeHighlightOptions

Controls the behavior of the unicode highlight feature (by default, ambiguous and invisible characters are highlighted).

unusualLineTerminators?: "off" | "auto" | "prompt"

Remove unusual line terminators like LINE SEPARATOR (LS), PARAGRAPH SEPARATOR (PS). Defaults to 'prompt'.

useShadowDOM?: boolean

Control if the editor should use shadow DOM.

useTabStops?: boolean

Inserting and deleting whitespace follows tab stops.

value?: string

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

wordBasedSuggestions?: boolean

Controls whether completions should be computed based on words in the document. Defaults to true.

wordBasedSuggestionsOnlySameLanguage?: boolean

Controls whether word based completions should be included from opened documents of the same language or any language.

wordSeparators?: string

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

wordWrap?: "on" | "off" | "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".

wordWrapBreakAfterCharacters?: string

Configure word wrapping characters. A break will be introduced after these characters.

wordWrapBreakBeforeCharacters?: string

Configure word wrapping characters. A break will be introduced before these characters.

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.

wordWrapOverride1?: "on" | "off" | "inherit"

Override the wordWrap setting.

wordWrapOverride2?: "on" | "off" | "inherit"

Override the wordWrapOverride1 setting.

wrappingIndent?: "none" | "same" | "indent" | "deepIndent"

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

wrappingStrategy?: "simple" | "advanced"

Controls the wrapping strategy to use. Defaults to 'simple'.