JSPM

@kangc/v-md-editor

0.0.9
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4386
  • Score
    100M100P100Q137509F
  • License MIT

A lightweight markdown editor built on Vue

Package Exports

  • @kangc/v-md-editor

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@kangc/v-md-editor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Markdown Editor built on Vue

Downloads Version License

安装

# 使用 npm
npm i @kangc/v-md-editor -S

# 使用yarn
yarn add @kangc/v-md-editor

全局注册

import Vue from 'vue';
import VueMarkdownEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/dist/style/index.css';

// 引入markdown样式 此处以github的markdown样式风格为例
import 'github-markdown-css';
// 引入markdown代码块高亮样式
import 'highlight.js/styles/github';

Vue.use(VueMarkdownEditor);

按需引入 highlightjs 语言包

内置了 xml(html) css js(javascript),若需要支持其他语言,请按需引入 highlightjs 语言包

查看支持的语言包

import bash from 'highlight.js/lib/languages/bash';

VueMarkdownEditor.hljs.registerLanguage('bash', bash);

更新日志

查看更新日志