I am trying to use Microsoft Monaco Editor component in my Jira plugin. Their document says to use the below logic for loading using AMD as document in https://github.com/microsoft/monaco-editor-samples/blob/master/browser-amd-editor/index.html.
<!-- OR ANY OTHER AMD LOADER HERE INSTEAD OF loader.js --><script src="../node_modules/monaco-editor/min/vs/loader.js"></script><script> require.config({ paths: { 'vs': '../node_modules/monaco-editor/min/vs' }}); require(['vs/editor/editor.main'], function() { var editor = monaco.editor.create(document.getElementById('container'), { value: ['function x() {','\tconsole.log("Hello world!");','}' ].join('\n'), language: 'javascript' }); });</script>
After downloading all the required JS files, how should I use AMD( JIRA uses almond.js, if I am not wrong)?
How should i require
the required modules? Or simply how can I use the above snippet for Jira?