[英]How do you set monaco-editor from readonly to writeable?
在我的代碼中,我創建了一個編輯器,如下所示:
this.monacoEditor = monaco.editor
.create(
document.getElementById('ide'), {
model: null,
readOnly: true,
contextmenu: false,
}
);
因此,該編輯器現在是只讀的。 我如何將this.monacoEditor
更改為可寫/可編輯?
我想到了。 在以上代碼的上下文中:
this.monacoEditor.updateOptions({readOnly: false});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.