1
0

Fix inconsistent and broken monaco editor loading

This commit is contained in:
Illya Marchenko 2022-01-04 01:21:38 +02:00
parent 4b527816ba
commit 93397a164d
3 changed files with 659 additions and 612 deletions

View File

@ -3,7 +3,8 @@
class MonacoEditorHooks {
public static function editPageShowEditFormInitial(EditPage $editpage, OutputPage $output){
$output->addScript('<script type="text/javascript" src="/extensions/MonacoEditor/assets/js/scripts.js"></script>');
$output->addHeadItem('monaco-loader', '<script type="text/javascript" src="/extensions/MonacoEditor/node_modules/monaco-editor/min/vs/loader.js"></script>');
$output->addScript('<script type="text/javascript" src="/extensions/MonacoEditor/assets/js/scripts.js" async></script>');
return true;
}
}

File diff suppressed because it is too large Load Diff

4
package-lock.json generated
View File

@ -1,6 +1,8 @@
{
"requires": true,
"name": "mediawiki-monacoeditor",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"monaco-editor": {
"version": "0.20.0",