【发布时间】:2021-12-09 09:51:01
【问题描述】:
$(document).ready(function() {
editor.updateOptions({'autoIndent': 'none'});
});
此代码不起作用。 我用错了吗? 有人请帮助我。
【问题讨论】:
标签: monaco-editor
$(document).ready(function() {
editor.updateOptions({'autoIndent': 'none'});
});
此代码不起作用。 我用错了吗? 有人请帮助我。
【问题讨论】:
标签: monaco-editor
我找到了解决办法!! 这很好用。
const editor = monaco.editor.create(document.getElementById("container"), {
value: "function hello(){\nalert('Hello world!');}",
language: "javascript",
"autoIndent": 'none',
"formatOnPaste": true,
"formatOnType": true
});
【讨论】: