Type alias EditorOptions

EditorOptions: {
    insertSpaces?: boolean;
    language: string;
    lineNumbers?: boolean;
    onSelectionChange?: EditorEventMap["selectionChange"] | null;
    onTokenize?: EditorEventMap["tokenize"] | null;
    onUpdate?: EditorEventMap["update"] | null;
    readOnly?: boolean;
    rtl?: boolean;
    tabSize?: number;
    value: string;
    wordWrap?: boolean;
}

Type declaration

  • Optional insertSpaces?: boolean

    Whether the editor should insert spaces for indentation.

    Default

    true
    
  • language: string

    Language used for syntax highlighting.

    Default

    "text"
    
  • Optional lineNumbers?: boolean

    Whether line numbers should be shown.

    Default

    true
    
  • Optional onSelectionChange?: EditorEventMap["selectionChange"] | null

    Function called when the selection changes in the editor.

  • Optional onTokenize?: EditorEventMap["tokenize"] | null

    Function called before the tokens are stringified to HTML.

  • Optional onUpdate?: EditorEventMap["update"] | null

    Function called when the code of the editor changes.

  • Optional readOnly?: boolean

    Whether the editor should be read only.

    Default

    false
    
  • Optional Experimental rtl?: boolean

    Whether the editor uses right to left directionality.

    Default

    false
    
  • Optional tabSize?: number

    Tabsize for the editor.

    Default

    2
    
  • value: string

    Code to display in the editor.

  • Optional wordWrap?: boolean

    Whether the editor should have word wrap.

    Default

    false
    

Generated using TypeDoc