How to make monaco-editor block window object and document object?

Discussão em 'Angular' iniciado por chen jack, Dezembro 9, 2024.

  1. chen jack

    chen jack Guest

    Because of special needs, it is necessary to let the user try not to use the window or document object, if the user inputs the window or document so that monaco-editor does not appear code prompts;

    I know that monaco-editor's code hints for window may be coming through the window object of the current browser environment, and I tried to block it with window=null, but this reports an error.

    window = null;
    this.editor = monaco.editor.create(this.editorElement.nativeElement, {
    value: '',
    language: 'javascript',
    });


    I don't know how to make monaco editor not show code hints related to window or document objects

    Continue reading...

Compartilhe esta Página