diff options
Diffstat (limited to 'web/pw-server/src/lib/components')
-rw-r--r-- | web/pw-server/src/lib/components/EditorView.svelte (renamed from web/pw-server/src/lib/components/Editor.svelte) | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/web/pw-server/src/lib/components/Editor.svelte b/web/pw-server/src/lib/components/EditorView.svelte index 5acbca5..c0dd109 100644 --- a/web/pw-server/src/lib/components/Editor.svelte +++ b/web/pw-server/src/lib/components/EditorView.svelte @@ -10,11 +10,15 @@ let editorDiv: HTMLDivElement | undefined; let editor: Ace.Editor | undefined; - onMount(async () => { + onMount(() => { let renderer = new ace.VirtualRenderer(editorDiv); editor = new ace.Editor(renderer, editSession); editor.setTheme(aceGithubTheme); }); + + $: if (editor !== undefined) { + editor.setSession(editSession); + } </script> <div bind:this={editorDiv} class="editor" /> |