1.使用markdown编辑器 VMdEditor 首先在项目的main.js中进行挂载,然后再去页面中使用 import{ createApp }from'vue';importVMdEditorfrom'@kangc/v-md-editor';import'@kangc/v-md-editor/lib/style/base-editor.css';importgithubThemefrom'@kangc/v-md-editor/lib/theme/github.js';import'@kangc/v-md...
use(VMdEditor); app.mount('#app'); 3. 在Vue组件中使用v-md-editor标签 在需要使用Markdown编辑器的Vue组件中,你可以直接使用<v-md-editor>标签: vue <template> <div> <h2>Markdown 编辑器示例</h2> <v-md-editor v-model="markdownContent" height="...
importVueMarkdownEditorfrom'@kangc/v-md-editor' import'@kangc/v-md-editor/lib/style/base-editor.css' importVMdpreviewfrom'@kangc/v-md-editor/lib/preview' importvuepressThemefrom'@kangc/v-md-editor/lib/theme/vuepress.js' import'@kangc/v-md-editor/lib/theme/style/vuepress.css' // githu...
importVueMarkdownEditorfrom'@kangc/v-md-editor' import'@kangc/v-md-editor/lib/style/base-editor.css' importVMdpreviewfrom'@kangc/v-md-editor/lib/preview' importvuepressThemefrom'@kangc/v-md-editor/lib/theme/vuepress.js' import'@kangc/v-md-editor/lib/theme/style/vuepress.css' // githu...
npm i @kangc/v-md-editor@next -S # 使用yarn yarn add @kangc/v-md-editor@next 引入组件 import { creatApp } from 'vue'; import VMdEditor from '@kangc/v-md-editor'; import '@kangc/v-md-editor/lib/style/base-editor.css'; ...
VMdEditor.use(githubTheme, { Hljs: hljs, }) app... .use(VMdEditor) // 富文本编辑器 .mount('#app') 1. 2. 3. 4. 5. 6. 在需要使用插件的页面文件中引入样式文件 (如果多处使用也可以在 main.ts 直接引入) AI检测代码解析 import...
import VMdPreview from'@kangc/v-md-editor/lib/preview'; import'@kangc/v-md-editor/lib/style/preview.css'; import githubTheme from'@kangc/v-md-editor/lib/theme/github.js'; import'@kangc/v-md-editor/lib/theme/style/github.css'; ...
安装v-md-editor 实现 Markdown 的编辑和显示; 安装@naturefw/storage 操作 indexedDB ,实现帮助文档的存储; 安装@naturefw/nf-state 实现状态管理; 安装axios 用于加载 json文件,实现导入功能。 用node写一个后端API,实现写入json文件的功能。 注意:库项目需要安装以上插件,帮助文档项目只需要安装 @naturefw/press...
import VMdPreview from '@kangc/v-md-editor/lib/preview'; import '@kangc/v-md-editor/lib/style/preview.css'; import githubTheme from '@kangc/v-md-editor/lib/theme/github.js'; import '@kangc/v-md-editor/lib/theme/style/github.css'; ...
VMdEditor.use(githubTheme, { Hljs: hljs, }) app... .use(VMdEditor)// 富文本编辑器.mount('#app') 在需要使用插件的页面文件中引入样式文件 (如果多处使用也可以在 main.ts 直接引入) import'@kangc/v-md-editor/lib/style/base-editor.css'import'@kangc/v-md-editor/lib/theme/style/github...