0.0.1 • Published 4 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-editorBasic 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:
Objectrefer to Monaco interface IStandaloneEditorConstructionOptions. - value
Stringvalue 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
4 years ago