fix(core): update

This commit is contained in:
2022-05-19 13:51:11 +02:00
parent 80597b25d6
commit 3b40811295
6 changed files with 889 additions and 10275 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@designestate/dees-editor',
version: '1.0.68',
version: '1.0.69',
description: 'an advanced editor for markdown documents based on monaco.'
}

View File

@ -70,12 +70,15 @@ export class DeesEditor extends DeesElement {
paths: { vs: "https://cdn.jsdelivr.net/npm/monaco-editor/min/vs" }
});
(window as any).require([ "vs/editor/editor.main" ], function () {
const editor: monaco.editor.IStandaloneCodeEditor = (window as any).monaco.editor.create(container, {
const editor = ((window as any).monaco.editor as typeof monaco.editor).create(container, {
value: "function hello() {\n\talert('Hello world!');\n}",
language: 'javascript',
language: 'markdown',
theme: 'vs-dark',
useShadowDOM: true
useShadowDOM: true,
fontSize: 16,
automaticLayout: true,
});
});
const css = await (await fetch('https://cdn.jsdelivr.net/npm/monaco-editor/min/vs/editor/editor.main.css')).text();
const styleElement = document.createElement('style');