monaco-editor/test/manual/cross-origin-good.html
2021-11-16 22:25:24 +01:00

34 lines
857 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
<body>
<h2>Monaco Editor cross origin correct</h2>
<div style="clear: both"></div>
<div
id="container"
style="float: left; width: 800px; height: 450px; border: 1px solid grey"
></div>
<div style="clear: both"></div>
<script src="../../metadata.js"></script>
<script src="dev-setup.js"></script>
<script>
window.MonacoEnvironment = {
getWorkerUrl: function () {
return 'cross-origin-worker-proxy.js#http://localhost:8088' + RESOLVED_CORE_PATH;
}
};
</script>
<script>
loadEditor(function () {
monaco.editor.create(document.getElementById('container'), {
value: document.documentElement.innerHTML,
language: 'css'
});
}, 'http://localhost:8088');
</script>
</body>
</html>