User:Imbushuo/MonacoEditor.js

/** * @license * * LoaderBootstrap.ts: Monaco Editor loader for MediaWiki. * --- * Copyright (c) 2017 The Little Moe New LLC. * * Beta technology - no warranty * * Note: You might want to disable all advanced editor features in order to let it work properly. * I haven't tested the compatibility with the original MediaWiki editor. * * Usage: * Add this code snippet to your user script: * mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Imbushuo/MonacoEditor.js&action=raw&ctype=text/javascript'); * */ (function{window.monacoLoader||$.getScript("https://imbushuos3.azureedge.net/Snippets/Monaco/vs/loader.js",function{require.config({paths:{vs:"https://imbushuos3.azureedge.net/Snippets/Monaco/vs"}});window.MonacoEnvironment={getWorkerUrl:function{return"/w/index.php?title=User:imbushuo/MonacoProxyStub.js&action=raw&ctype=text/javascript"}};console.info("Monaco loaded and environment has been configured.");require(["vs/editor/editor.main"],function{$.getScript("/w/index.php?title=User:imbushuo/MonacoLoader.js&action=raw&ctype=text/javascript",function{if(MwMonaco.MonacoLoader.determineAvailability){var loader=new MwMonaco.MonacoLoader(document.getElementById("wpTextbox1"));loader.initialize;window.monacoLoader=loader}})})})}); //# sourceMappingURL=LoaderBootstrap.min.js.map