Skip to content

Instantly share code, notes, and snippets.

@sandyarmstrong
Created September 2, 2016 19:56
Show Gist options
  • Save sandyarmstrong/e8a04f826787b441558f37c2f2cd16f8 to your computer and use it in GitHub Desktop.
Save sandyarmstrong/e8a04f826787b441558f37c2f2cd16f8 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script type="text/javascript" src="node_modules/monaco-editor/dev/vs/loader.js"></script>
<script type="text/javascript">
require.config({ paths: { 'vs': 'node_modules/monaco-editor/dev/vs' }});
require(['vs/editor/editor.main'], function() {
monaco.editor.create(document.getElementById("editorA"), {
value: "function hello() {\n\talert('Hello world!');\n}",
language: "javascript",
scrollBeyondLastLine: false,
});
});
</script>
<style type="text/css">
.monaco-editor .inputarea { position: fixed !important; top: 0 !important; left: 0 !important; }
</style>
</head>
<body>
<div id="editorA" style="height:200px; width:500px; border: 1px solid"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment