interface CodeEditorConstructorOptions {
    accessibilityPageSize?: number;
    ariaContainerElement?: HTMLElement;
    ariaLabel?: string;
    automaticLayout?: boolean;
    codeLens?: boolean;
    colorDecorators?: boolean;
    colorDecoratorsLimit?: number;
    contextmenu?: boolean;
    dragAndDrop?: boolean;
    extraEditorClassName?: string;
    folding?: boolean;
    fontFamily?: string;
    fontSize?: number;
    fontWeight?: string;
    language?: CodeEditorLanguage;
    letterSpacing?: number;
    lightbulb?: boolean;
    lineHeight?: number;
    lineNumbers?: boolean;
    links?: boolean;
    minimap?: boolean;
    multiCursorLimit?: number;
    multiCursorModifier?: "ctrlCmd" | "alt";
    padding?: { bottom: number; top: number };
    readOnly?: boolean;
    tabIndex?: number;
    theme?: CodeEditorTheme;
    value?: string;
    wordWrap?: "off" | "on" | "wordWrapColumn" | "bounded";
}

Properties

accessibilityPageSize?: number

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

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

automaticLayout?: boolean

Enable that the editor will install a ResizeObserver to check if its container dom node size has changed. Defaults to false.

codeLens?: boolean

Show code lens Defaults to true.

colorDecorators?: boolean

Enable inline color decorators and color picker rendering.

colorDecoratorsLimit?: number

Controls the max number of color decorators that can be rendered in an editor at once.

contextmenu?: boolean

Enable custom contextmenu. Defaults to true.

dragAndDrop?: boolean

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

extraEditorClassName?: string

Class name to be added to the editor.

folding?: boolean

Enable code folding. Defaults to true.

fontFamily?: string

The font family

fontSize?: number

The font size

fontWeight?: string

The font weight

The initial language of the auto created model in the editor.

letterSpacing?: number

The letter spacing

lightbulb?: boolean

Control the behavior and rendering of the code action lightbulb.

lineHeight?: number

The line height

lineNumbers?: boolean

Control the rendering of line numbers. Defaults to true.

links?: boolean

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

minimap?: boolean

Control the behavior and rendering of the minimap.

multiCursorLimit?: number

Controls the max number of text cursors that can be in an active editor at once.

multiCursorModifier?: "ctrlCmd" | "alt"

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

padding?: { bottom: number; top: number }

Controls the spacing around the editor.

CodeEditorConstructorOptions

readOnly?: boolean

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

tabIndex?: number

The tabindex property of the editor's textarea

Initial theme to be used for rendering. The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light. 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.

value?: string

The initial value of the auto created model in the editor.

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

MMNEPVFCICPMFPCPTTAAATR