|
|
|
+{"version":3,"file":"8819.js","mappings":"8IAAA,w6B","sources":["file:////home/runner/work/monaco-editor/monaco-editor/website/src/website/data/playground-samples/creating-the-editor/web-component/sample.js"],"sourcesContent":["export default \"customElements.define(\\n\\t\\\"code-view-monaco\\\",\\n\\tclass CodeViewMonaco extends HTMLElement {\\n\\t\\t_monacoEditor;\\n\\t\\t/** @type HTMLElement */\\n\\t\\t_editor;\\n\\n\\t\\tconstructor() {\\n\\t\\t\\tsuper();\\n\\n\\t\\t\\tconst shadowRoot = this.attachShadow({ mode: \\\"open\\\" });\\n\\n\\t\\t\\t// Copy over editor styles\\n\\t\\t\\tconst style = document.querySelector(\\n\\t\\t\\t\\t\\\"link[rel='stylesheet'][data-name='vs/editor/editor.main']\\\"\\n\\t\\t\\t);\\n\\t\\t\\tshadowRoot.appendChild(style.cloneNode(true));\\n\\n\\t\\t\\tconst template = /** @type HTMLTemplateElement */ (\\n\\t\\t\\t\\tdocument.getElementById(\\\"editor-template\\\")\\n\\t\\t\\t);\\n\\t\\t\\tshadowRoot.appendChild(template.content.cloneNode(true));\\n\\n\\t\\t\\tthis._editor = shadowRoot.querySelector(\\\"#container\\\");\\n\\t\\t\\tthis._monacoEditor = monaco.editor.create(this._editor, {\\n\\t\\t\\t\\tautomaticLayout: true,\\n\\t\\t\\t\\tlanguage: \\\"html\\\",\\n\\n\\t\\t\\t\\tvalue: `<div>Hello World</div>`,\\n\\t\\t\\t});\\n\\t\\t}\\n\\t}\\n);\\n\";"],"names":[],"sourceRoot":""}
|