Reactive two-way, full theme support monaco editor for Svelte(&Kit).
pnpm install --save-dev svelte-monaco
<script lang="ts">
// if you want to get themes, feel free to import exportedThemes, nativeThemes, or themeNames.
import Monaco from 'svelte-monaco';
// this is fully reactive! setting value to another string will change the editor accordingly
let value = 'const x = 5';
</script>
<div id="editor">
<!-- event.detail is the monaco instance. All options are reactive! -->
<Monaco
options={{ language: 'typescript', automaticLayout: true }}
theme="vs-dark"
on:ready={(event) => console.log(event.detail)}
bind:value
/>
</div>
<textarea bind:value />