ID photo of Ciro Santilli taken in 2013 right eyeCiro Santilli OurBigBook logoOurBigBook.com  Sponsor 中国独裁统治 China Dictatorship 新疆改造中心、六四事件、法轮功、郝海东、709大抓捕、2015巴拿马文件 邓家贵、低端人口、西藏骚乱
web-cheat/monaco-editor-crlf.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Monaco editor</title>
<link rel="stylesheet" data-name="vs/editor/editor.main" href="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.20.0/min/vs/editor/editor.main.min.css">
</head>
<body>
https://stackoverflow.com/questions/56525822/how-to-set-eol-to-lf-for-windows-so-that-api-gets-value-with-n-not-r-n
https://stackoverflow.com/questions/51320218/how-to-set-end-of-line-in-monaco-editor
https://stackoverflow.com/questions/54655031/monaco-editor-newline-in-getvalue
https://github.com/suren-atoyan/monaco-react/discussions/247
https://microsoft.github.io/monaco-editor/api/enums/monaco.editor.EndOfLinePreference.html
https://microsoft.github.io/monaco-editor/api/enums/monaco.editor.DefaultEndOfLine.html
https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.ITextModel.html
<div id="container" style="height:400px;border:1px solid black;"></div>
<div id="output" style="height:400px;border:1px solid black;"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.1/min/vs/loader.min.js"></script>
<script>
const outputElem = document.getElementById('output');
require.config({ paths: { 'vs': 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.1/min/vs' }});
require(["vs/editor/editor.main"], () => {
  const editor = monaco.editor.create(document.getElementById('container'), {});
  const model = editor.getModel()
  model.setEOL(monaco.editor.EndOfLineSequence.LF);
  //model.setEOL(monaco.editor.EndOfLineSequence.CRLF);
  editor.onDidChangeModelContent(async (e) => {
    outputElem.innerHTML = JSON.stringify(editor.getValue());
  });
});
</script>
</body>
</html>