monaco-yaml/examples/monaco-editor-webpack-plugin/index.js
2021-11-11 17:20:19 +01:00

17 lines
294 B
JavaScript

const value = `
number: 0xfe
boolean: true
`;
async function create() {
// eslint-disable-next-line import/extensions
const monaco = await import('./main.js');
monaco.editor.create(document.querySelector('.editor'), {
language: 'yaml',
tabSize: 2,
value,
});
}
create();