<script setup lang="ts">
import Vditor from "vditor";
import {onMounted, ref} from "vue";
import "vditor/dist/index.css"
const editor = ref()

onMounted(()=>{
    new Vditor(editor.value, {
        mode: "ir",
        height: "80vh",
        toolbarConfig: {
            pin: true
        },
        preview:{
            hljs: {
                enable: true,
                lineNumber: true,
                style: "native"
            }
        },
        resize:{
          enable: true
        },
        cache: {
            enable: false
        },
        after() {

        }
    })
})

</script>

<template>
    <div ref="editor"></div>
</template>

<style scoped lang="scss">

</style>
