starwait/components/Home/Blog/Markdown.vue
2025-04-28 18:02:35 +08:00

22 lines
427 B
Vue

<script setup lang="ts">
import { Editor } from '@bytemd/vue-next'
import gfm from '@bytemd/plugin-gfm'
const content = ref('')
const plugins = [gfm()]
const handleChange = (v: string) => {
content.value = v
}
</script>
<template>
<Editor :value="content" :plugins="plugins" @change="handleChange" class="byteMd"/>
</template>
<style scoped lang="scss">
.byteMd{
position: relative;
height: 100%;
}
</style>