How to set EOL to LF for windows so that API gets value with \n. not \r\n

Viewed 493

I've used monaco.editor.create method for creating model. The problem is monaco is parsing multiline codes into \r\n format in windows OS.

I've tried using defaultEOL as 'LF' in editorOptions in monaco.editor.create()

    let editorOptions = {
      value,
      quickSuggestions: { other: true, comments: true, strings: true },
      language: language,
      tabSize: tabSize,

      ...options
    };
    this._editor = monaco.editor.create(this._node, editorOptions);

I expect monaco editor to request my API with value \n

1 Answers
Related