2023-03-07 18:44:39 +08:00
|
|
|
<template>
|
2023-03-10 22:02:19 +08:00
|
|
|
<mavon-editor
|
|
|
|
|
:subfield="subfield"
|
|
|
|
|
:codeStyle="props.codeStyle"
|
|
|
|
|
:ishljs="true"
|
2023-03-11 01:16:28 +08:00
|
|
|
:style="{minHeight:props.height,maxHeight:'100%'}"
|
2023-03-10 22:02:19 +08:00
|
|
|
class="edit"
|
|
|
|
|
@change="change"
|
|
|
|
|
></mavon-editor>
|
2023-03-07 18:44:39 +08:00
|
|
|
</template>
|
2023-03-10 22:02:19 +08:00
|
|
|
<script setup>
|
|
|
|
|
// Local Registration
|
|
|
|
|
import { mavonEditor } from 'mavon-editor'
|
|
|
|
|
import 'mavon-editor/dist/css/index.css'
|
|
|
|
|
import { ref } from 'vue';
|
|
|
|
|
const props = defineProps(['height','modelValue',"codeStyle"])
|
|
|
|
|
const emit=defineEmits(['update:modelValue'])
|
|
|
|
|
const subfield = true;
|
|
|
|
|
const change=(value ,render)=>
|
|
|
|
|
{
|
|
|
|
|
emit('update:modelValue', render)
|
|
|
|
|
}
|
2023-03-07 18:44:39 +08:00
|
|
|
|
2023-03-10 22:02:19 +08:00
|
|
|
</script>
|
|
|
|
|
<style scoped>
|
|
|
|
|
.edit
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
</style>
|