File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ export default {
186186 if (editor != null && editor .getModifiedEditor != null ) {
187187 return editor .getModifiedEditor ()
188188 }
189- return editor
189+ return null
190190 },
191191 },
192192
@@ -241,16 +241,17 @@ export default {
241241 },
242242
243243 createEditor () {
244- const editor = monaco .editor .create (
245- this .$el ,
246- Object .assign ({ value: this .code , language: " html" }, EDITOR_OPTS )
247- )
244+ const editor = monaco .editor .create (this .$el , EDITOR_OPTS )
245+ const model = monaco .editor .createModel (this .code , " html" )
248246
249247 // Set change event.
250- editor . getModel () .onDidChangeContent (() => {
248+ model .onDidChangeContent (() => {
251249 this .invalidate ()
252250 })
253251
252+ // Set model.
253+ editor .setModel (model)
254+
254255 // Set markers.
255256 updateMarkers (editor, this .messages )
256257
You can’t perform that action at this time.
0 commit comments