mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 12:45:39 +01:00
update samples
This commit is contained in:
parent
a4d7907bd4
commit
b19105b7e7
24 changed files with 294 additions and 3505 deletions
30
samples/legacy/browser-amd-localized/index.html
Normal file
30
samples/legacy/browser-amd-localized/index.html
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
<h2>Monaco Editor Localization Sample</h2>
|
||||
<div id="container" style="width: 800px; height: 600px; border: 1px solid grey"></div>
|
||||
|
||||
<script src="../../node_modules/monaco-editor/min/vs/loader.js"></script>
|
||||
<script>
|
||||
require.config({ paths: { vs: '../../node_modules/monaco-editor/min/vs' } });
|
||||
|
||||
require.config({
|
||||
'vs/nls': {
|
||||
availableLanguages: {
|
||||
'*': 'de'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
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>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue