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
I use the following:
let textModel = monaco.editor.createModel("");
textModel.setEOL(0);
Documentation:
monaco.editor.createModel
ITextModel.setEOL
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With