diff --git a/web/package.json b/web/package.json index 09814a5fba..95693d3273 100644 --- a/web/package.json +++ b/web/package.json @@ -35,7 +35,7 @@ "md5": "^2.2.1", "mitt": "^1.1.3", "moment": "^2.22.2", - "monaco-editor": "^0.15.1", + "monaco-editor": "^0.20.0", "pinyin": "^2.9.0", "qs": "^6.9.1", "reconnecting-websocket": "^4.1.10", diff --git a/web/src/js/component/editor/editor.vue b/web/src/js/component/editor/editor.vue index 1418ae01aa..dad5484c92 100644 --- a/web/src/js/component/editor/editor.vue +++ b/web/src/js/component/editor/editor.vue @@ -91,7 +91,7 @@ export default { if (newValue == this.getValue()) { return; } - let readOnly = this.editor.getConfiguration().readOnly; + let readOnly = this.editor.getRawOptions().readOnly; if (readOnly) { // editor.setValue 和 model.setValue 都会丢失撤销栈 this.editor.setValue(newValue);