md editor v3
v5.1.1
英语| 中文
在jsx和typescript开发的VUE3的Markdown编辑器。
文档和示例:去
React的同一系列编辑器:MD编辑器RT
prettier美化您的内容(仅用于Markdown内容,而不是代码和其他文本)。default , vuepress , github , cyanosis , mk-cute , smart-blue样式(不相同)的主题。也可以自定义(请参阅示例页面)。mermaid (> = 1.8.0), katex数学公式(> = 1.9.0)。| 默认主题 | 黑暗主题 | 仅预览 |
|---|---|---|
输入提示和标记,表情符号扩展
yarn add md-editor-v3使用现有的语言和主题扩展,例如日语
yarn add @vavt/cm-extension使用工具栏的现有组件,例如将内容导出为PDF
yarn add @vavt/v3-extension有关使用或贡献的更多方法,请参阅:MD-编辑 - 扩展
使用服务器端渲染时,请确保将editorId设置为恒定值。
从4.0.0开始,可以按需导入内部组件。
< template >
< MdEditor v-model = " text " />
</ template >
< script setup>
import { ref } from ' vue ' ;
import { MdEditor } from ' md-editor-v3 ' ;
import ' md-editor-v3/lib/style.css ' ;
const text = ref ( ' # Hello Editor ' );
</ script >< template >
< MdPreview :id = " id " :modelValue = " text " />
< MdCatalog :editorId = " id " :scrollElement = " scrollElement " />
</ template >
< script setup>
import { ref } from ' vue ' ;
import { MdPreview , MdCatalog } from ' md-editor-v3 ' ;
import ' md-editor-v3/lib/preview.css ' ;
const id = ' preview-only ' ;
const text = ref ( ' # Hello Editor ' );
const scrollElement = document . documentElement ;
</ script >使用服务器端渲染时, scrollElement应为字符串类型,例如: html , body , #id , .class 。
有关更多用法,请访问该文件。