All Projects → miaolz123 → Vue Markdown

miaolz123 / Vue Markdown

Licence: mit
A Powerful and Highspeed Markdown Parser for Vue

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
Vue
7211 projects

Projects that are alternatives of or similar to Vue Markdown

Vue Styleguidist
Created from react styleguidist for Vue Components with a living style guide
Stars: ✭ 2,133 (+25.77%)
Mutual labels:  markdown, vue-components
Vue Loaders
Vue + loaders.css
Stars: ✭ 127 (-92.51%)
Mutual labels:  vue-components
Notes Cli
Small markdown note taking CLI app playing nicely with your favorite editor and other CLI tools
Stars: ✭ 122 (-92.81%)
Mutual labels:  markdown
Honkit
📖 HonKit is building beautiful books using Markdown - Fork of GitBook
Stars: ✭ 1,901 (+12.09%)
Mutual labels:  markdown
Markdown Css
A tool convert css style into markdown inline style
Stars: ✭ 122 (-92.81%)
Mutual labels:  markdown
Storefront Ui
Customization-first, performance-oriented and elegant UI framework for eCommerce (and not only) based on Vue.js and Google Retail UX Playbook. Made with 💚 by Vue Storefront team and contributors.
Stars: ✭ 1,827 (+7.72%)
Mutual labels:  vue-components
Wwdc Recap
A collection of session summaries in markdown format, from WWDC 20, 19 & 17
Stars: ✭ 121 (-92.87%)
Mutual labels:  markdown
Torchbear
🔥🐻 The Speakeasy Scripting Engine Which Combines Speed, Safety, and Simplicity
Stars: ✭ 128 (-92.45%)
Mutual labels:  markdown
Mdtopdf
🐳 Pandoc docker image for converting markdown to PDF using TeX typesetting
Stars: ✭ 127 (-92.51%)
Mutual labels:  markdown
React Code View
Code editor for React
Stars: ✭ 124 (-92.69%)
Mutual labels:  markdown
Liche
Fast Link Checker for Markdown and HTML in Go
Stars: ✭ 123 (-92.75%)
Mutual labels:  markdown
Lessmd
A small markdown viewer/converter for unix terminal.
Stars: ✭ 122 (-92.81%)
Mutual labels:  markdown
Docs
Official repository containing all docs & guides of OVH Group
Stars: ✭ 126 (-92.57%)
Mutual labels:  markdown
Githubdocs
Easily build a searchable documentation app using markdown files in your Github Repo or local Markdown files.
Stars: ✭ 122 (-92.81%)
Mutual labels:  markdown
Press
Cross-platform markdown editor written in Kotlin Multiplatform (work in progress)
Stars: ✭ 1,748 (+3.07%)
Mutual labels:  markdown
Markdownslides
MarkdownSlides is a Reveal.js and PDF slides generator from MARKDOWN files, that also generate HTML, EPUB and DOCX documents. The idea is that from a same MARKDOWN file we can get slides and books without worrying about style, just worrying about content.
Stars: ✭ 121 (-92.87%)
Mutual labels:  markdown
Markdown Intro
Markdown Intro / Markdown 简介
Stars: ✭ 123 (-92.75%)
Mutual labels:  markdown
Xrichtext
一个Android富文本类库,支持图文混排,支持编辑和预览,支持插入和删除图片。
Stars: ✭ 1,639 (-3.36%)
Mutual labels:  markdown
Md
A markdown parser and compiler. Built for speed.
Stars: ✭ 128 (-92.45%)
Mutual labels:  markdown
Swagger Markdown
swagger to markdown translater
Stars: ✭ 127 (-92.51%)
Mutual labels:  markdown

vue-markdown

npm npm npm

If you want vue-markdown for vue1.X.X, please checkout vue-markdown1.X.X.

A Powerful and Highspeed Markdown Parser for Vue.

Quick start: <vue-markdown>i am a ~~tast~~ **test**.</vue-markdown>

Supported Markdown Syntax:

  • automatic table of contents
  • table & class customize
  • *SyntaxHighlighter
  • definition list
  • strikethrough
  • GFM task list
  • abbreviation
  • superscript
  • subscript
  • footnote
  • insert
  • *katex
  • emoji
  • mark

*SyntaxHighlighter work with Prism recommend

*katex need add katex css.

Example

simple

webpack-simple

Live Demo

Installation

Browser globals

The dist folder contains vue-markdown.js with the component exported in the window.VueMarkdown object.

<body>
  <vue-markdown>i am a ~~tast~~ **test**.</vue-markdown>
</body>
<script src="path/to/vue.js"></script>
<script src="path/to/vue-markdown.js"></script>
<script>
    Vue.use(VueMarkdown);
    var vm = new Vue({
        el: "body"
    });
</script>

NPM

$ npm install --save vue-markdown

Yarn

$ yarn add vue-markdown --save

CommonJS

var VueMarkdown = require('vue-markdown');

new Vue({
  components: {
    'vue-markdown': VueMarkdown
  }
})

ES6 (Vue-CLI users)

After installing via Yarn or NPM, use the following snippet in the script portion of the Vue component which you wish to render the Markdown.

import VueMarkdown from 'vue-markdown'

new Vue({
  components: {
    VueMarkdown
  }
})

Slots

<vue-markdown>this is the default slot</vue-markdown>

After setting up the middleware in your vue component above, using the embedded markdown is as easy as writing it between the vue-markdown tags.

VueMarkdown has a default slot which is used to write the markdown source.

TIP: The default slot only renders once at the beginning, and it will overwrite the prop of source!

Props

Prop Type Default Describe
watches Array ["source", "show", "toc"] HTML refresh automatically when the prop in this array changed
source String null the markdown source code
show Boolean true enable render to the default slot automatically
html Boolean true enable HTML syntax in source
xhtml-out Boolean true <br></br> => <br />
breaks Boolean true \n => <br>
linkify Boolean true autoconvert URL-like text to link
emoji Boolean true :) => 😃
typographer Boolean true enable some language-neutral replacement and quotes beautification
lang-prefix String language- CSS language prefix for fenced blocks
quotes String “”‘’ use “”‘’ for Chinese, „“‚‘ for German, «»„“ for Russian
table-class String table customize html class of the <table>
task-lists Boolean true enable GFM task list
toc Boolean false enable automatic table of contents
toc-id String undefined the HTML id to render TOC
toc-class String table customize html class of the <ul> wrapping the TOC
toc-first-level Number 2 use 2 if you want to skip <h1> from the TOC
toc-last-level Number 'toc-first-level' + 1 use 5 if you want to skip <h6> from the TOC
toc-anchor-link Boolean true enable the automatic anchor link in the headings
toc-anchor-class String toc-anchor customize the anchor class name
toc-anchor-link-symbol String # customize the anchor link symbol
toc-anchor-link-space Boolean true enable inserting a space between the anchor link and heading
toc-anchor-link-class String toc-anchor-link customize the anchor link symbol class name
anchorAttributes Object {} anchor tag attributes such as target: '_blank' or rel: 'nofollow'
prerender Function (String) String null filter function before markdown parse
postrender Function (String) String null filter function after markdown parse

Events

Name Param[Type] Describe
rendered outHtml[String] dispatch when render finish
toc-rendered tocHtml[String] dispatch when TOC render finish, never dispatch if the toc[prop] is false

Thanks

Contributions

License

Copyright (c) 2016 miaolz123 by MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].