0.0.1 • Published 3 years ago
mp-monaco-editor v0.0.1
mp-monaco-editor
Monaco Editor for Vue3.
Installation
npm i mp-monaco-editor
or
yarn add mp-monaco-editor
Basic Using
<template>
<MonacoEditor v-model:value="code"/>
</template>
<script setup>
import MonacoEditor from 'mp-monaco-editor'
import { ref } from 'vue'
const code = ref('')
</script>
Properties
- options:
Object
refer to Monaco interface IStandaloneEditorConstructionOptions. - value
String
value of the auto created model in the editor. - instanceId:
String
. Defaults tomp_monaco
. - insertValue:
String
. Insert text at the mouse. - defaultValue:
String
. the initial value of the auto created model in the editor. - wrapClassName:
String
. the wrapClassName of the editor - contentStyle:
Object
. the contentStyle of the editor - autoFormat:
Boolean
. support of the auto format in the editor. - editorMounted(editor): an event emitted when the editor has been mounted (onMounted of Vue3).
- editorUnmounted: an event emitted when the editor has been unmounted (onUnmounted of Vue3).
0.0.1
3 years ago