-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tony Lea
authored and
Tony Lea
committed
Dec 2, 2024
1 parent
fc5dd8a
commit bd4b0b5
Showing
3 changed files
with
33 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 2 additions & 15 deletions
17
src/resources/views/frames/monaco-editor/javascript/init.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,11 @@ | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.20.0/min/vs/loader.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.52.0/min/vs/loader.min.js"></script> | ||
<script> | ||
// Based on https://jsfiddle.net/developit/bwgkr6uq/ which just works but is based on unpkg.com. | ||
// Provided by loader.min.js. | ||
require.config({ | ||
paths: { | ||
'vs': 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.20.0/min/vs' | ||
'vs': 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.52.0/min/vs' | ||
} | ||
}); | ||
let proxy = URL.createObjectURL(new Blob([` | ||
self.MonacoEnvironment = { | ||
baseUrl: 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.20.0/min' | ||
}; | ||
importScripts('https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.20.0/min/vs/base/worker/workerMain.min.js'); | ||
`], { | ||
type: 'text/javascript' | ||
})); | ||
window.MonacoEnvironment = { | ||
getWorkerUrl: () => proxy | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters