This package has been deprecated

Author message:

please use @uwu/monaco-vue

simple-vue-monaco

1.1.0 • Public • Published

Monaco for Vue

This is a component that wraps Microsoft's great Monaco editor for Vue. (yes another one) (this one is better i promise)

All props are reactive.

See below for (pretty self explanatory) usage.

You may use any theme from here by name.

You can use monaco from an npm package by passing to noCDN. This will only do anything on the first render of any <Monaco>, and will apply to all later uses of the component.

If you do not do this, monaco will just be loaded from jsDelivr.

<script setup lang="ts">
import {ref} from "vue";
import Monaco from "simple-vue-monaco";
import * as monaco from "monaco-editor"

let value = ref("");
</script>

<template>
<!--value and lang are required-->
  <Monaco
      v-model="value"
      lang="javascript"
      theme="Monokai"
      :readonly="false"
      height="30rem"
      width="20rem"
      :otherCfg="{}"
      :noCDN="monaco"
  />
</template>

Readme

Keywords

none

Package Sidebar

Install

npm i simple-vue-monaco

Weekly Downloads

3

Version

1.1.0

License

BSD-3

Unpacked Size

5.67 kB

Total Files

6

Last publish

Collaborators

  • yellowsink