mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 17:25:39 +01:00
Import monaco-editor instead of editor.api.
This commit is contained in:
parent
213f1821ec
commit
82b5487f2b
2 changed files with 1 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
import * as monaco from 'monaco-editor';
|
||||||
|
|
||||||
// expose the monaco API as a global for tests
|
// expose the monaco API as a global for tests
|
||||||
window.monacoAPI = monaco;
|
window.monacoAPI = monaco;
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,6 @@ If using Webpack 4 or lower, it is necessary to use the file-loader instead of A
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import * as monaco from 'monaco-editor';
|
import * as monaco from 'monaco-editor';
|
||||||
// or import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
|
||||||
// if shipping only a subset of the features & languages is desired
|
|
||||||
|
|
||||||
monaco.editor.create(document.getElementById('container'), {
|
monaco.editor.create(document.getElementById('container'), {
|
||||||
value: 'console.log("Hello, world")',
|
value: 'console.log("Hello, world")',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue