api is currently unstable, please do not use it in production immediately as there may be breaking changes.
a simple vue3 monaco editor component
pnpm install vue-monaco-next
# or
yarn add vue-monaco-next
# or
npm install vue-monaco-next
import { createApp } from 'vue'
import App from './App.vue'
import MonacoEditor from 'vue-monaco-next'
createApp(App)
.component('monaco-editor', MonacoEditor)
.mount('#app')
<script setup>
import { ref } from 'vue'
import MonacoEditor from 'vue-monaco-next'
const code = ref('const a = 1')
</script>
<template>
<MonacoEditor v-model="code" />
</template>