效果图:
安装
npm install cherry-markdown --save
vue文件代码:
<template>
<cherry-markdown ></cherry-markdown>
</template>
<script lang="ts">
import CherryMarkdown from 'cherry-markdown';
import { ref } from 'vue'
import 'cherry-markdown/dist/cherry-markdown.css';
import Cherry from 'cherry-markdown';
const cherryInstance = new Cherry({
id: 'markdown-container',
value: '# welcome to cherry editor!',
});
</script>