Skip to content

Commit

Permalink
Update to Monaco editor version 0.34.0 and adapt to new API
Browse files Browse the repository at this point in the history
Link the new version and adapt our setup to match the changed API:

+ Fix error 'Cannot read properties of undefined (reading 'editor.foreground')' described at microsoft/monaco-editor#2764 and atularen/ngx-monaco-editor#259 : Apply the patch from microsoft/monaco-editor@88fd0a6
+ Fix error 'Uncaught Error: a.onDidChangeValue is not a function': Apply the patch https://stackoverflow.com/questions/54795603/always-show-the-show-more-section-in-monaco-editor/73287722#73287722
  • Loading branch information
Viir committed Oct 17, 2022
1 parent 9da07c2 commit 7d1102f
Show file tree
Hide file tree
Showing 3 changed files with 220 additions and 217 deletions.
4 changes: 2 additions & 2 deletions implement/example-apps/elm-editor/src/Backend/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ monacoHtmlDocument =
-}
monacoCdnURLs : List String
monacoCdnURLs =
[ "https://unpkg.com/monaco-editor@0.27.0/min"
, "https://cdn.jsdelivr.net/npm/monaco-editor@0.27/min"
[ "https://cdn.jsdelivr.net/npm/monaco-editor@0.34.0/min"
, "https://unpkg.com/monaco-editor@0.34.0/min"
]


Expand Down
8 changes: 5 additions & 3 deletions implement/example-apps/elm-editor/src/MonacoHtml.elm
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,8 @@ monacoHtmlDocumentFromCdnUrl cdnUrlToMin =
{ token: 'keyword', foreground: '#C586C0' },
{ token: 'type', foreground: '#569CD6' },
{ token: 'function.name', foreground: '#DCDCAA' },
]
],
colors: {},
});
var editor = monaco.editor.create(document.getElementById('container'), {
Expand Down Expand Up @@ -352,8 +353,9 @@ monacoHtmlDocumentFromCdnUrl cdnUrlToMin =
set(key) {
// console.log("storageService.set: " + key);
},
onWillSaveState() { },
onDidChangeStorage() { }
onWillSaveState() {},
onDidChangeStorage() {},
onDidChangeValue() {},
}
});
Expand Down
Loading

0 comments on commit 7d1102f

Please sign in to comment.