Getting started

Install

npm
npm install -D monaco-editor nuxt-monaco-editor
yarn
yarn add -D monaco-editor nuxt-monaco-editor
pnpm
pnpm add -D monaco-editor nuxt-monaco-editor

Don't forget to install monaco-editor.

Setup

  1. Add this module to the Nuxt config
export default defineNuxtConfig({
modules: [
'nuxt-monaco-editor'
]
})
  1. Use the component in your pages or components
<template>
<MonacoEditor lang="typescript" />
</template>
Table of Contents