1 Star 0 Fork 0

ORH / vue-markdown-editor

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

Vue markdown editor and marked

npm npm GitHub

具备 markdown 编辑器和 marked 文本解析显示功能

examples

通过链接

<link href="<path>/dist/css/themes/<theme>.css" rel="stylesheet">
<link href="<path>/dist/css/vue-markdown-editor.css" rel="stylesheet">

<script src="https://cdn.bootcss.com/vue/2.6.10/vue.min.js"></script>
<script src="<path>/dist/js/vue-markdown-editor.js"></script>

示例

NPM

  1. 安装
$ yarn add @orh/vue-markdown-editor --dev
  1. 常规
  • main.js
import Vue from 'vue';
import VueMarkdownEditor from '@orh/vue-markdown-editor';
import '@orh/vue-markdown-editor/dist/css/themes/<theme>.css';
import '@orh/vue-markdown-editor/dist/css/vue-markdown-editor.css';
import App from './App.vue';

Vue.use(VueMarkdownEditor);

new Vue({
  el: '#app',
  render: h => h(App)
});
  1. Laravel
  • resources/js/app.js
import VueMarkdownEditor from '@orh/vue-markdown-editor';

Vue.use(VueMarkdownEditor);
  • resources/sass/app.scss
@import "~@orh/vue-markdown-editor/dist/css/themes/<theme>.css";
@import "~@orh/vue-markdown-editor/dist/css/vue-markdown-editor.css";

使用编辑器

<vue-markdown-editor v-model="content"></vue-markdown-editor>
属性 说明 类型 默认值
value markdown 文本,可以使用 v-model 双向绑定数据 String
options 可传入 simplemde-markdown-editor 的所有配置 Object {}
name 表单 textarea 的 name 属性 String -

使用解析器

<vue-marked :value="content"></vue-marked>
属性 说明 类型 默认值
value markdown 文本 String

代码高亮主题

License

MIT

Comments ( 0 )

Sign in for post a comment

About

Cancel

Releases

No release

Contributors

All

Activities

load more
can not load any more
JavaScript
1
https://gitee.com/orh/vue-markdown-editor.git
git@gitee.com:orh/vue-markdown-editor.git
orh
vue-markdown-editor
vue-markdown-editor
master

Search