Menu

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Enterprise Open source

CodeEditor variable

CodeEditor variable

Signature

typescript
CodeEditor: React.FunctionComponent<{
    value: string;
    onBlur?: import("./types").CodeEditorChangeHandler | undefined;
    readOnly?: boolean | undefined;
    height?: string | number | undefined;
    width?: string | number | undefined;
    language: string;
    showMiniMap?: boolean | undefined;
    showLineNumbers?: boolean | undefined;
    monacoOptions?: import("./types").MonacoOptionsWithGrafanaDefaults | undefined;
    onBeforeEditorMount?: ((monaco: typeof monacoType) => void) | undefined;
    onEditorDidMount?: ((editor: monacoType.editor.IStandaloneCodeEditor, monaco: typeof monacoType) => void) | undefined;
    onSave?: import("./types").CodeEditorChangeHandler | undefined;
    getSuggestions?: import("./types").CodeEditorSuggestionProvider | undefined;
    containerStyles?: string | undefined;
}>

Import

typescript
import { CodeEditor } from '@grafana/ui';