1.0.1 • Published 6 years ago
@ky-is/vue-markdown-poi v1.0.1
vue-markdown-poi
A lightweight Vue component for rendering content with a Markdown-like syntax subset. It's designed for my personal projects, but you may find it useful.
Install
Note: This module is not currently available pre-built. As such, your project will need a build step to use it. Or just copy the code directly into your project.
npm install --save-dev @ky-is/vue-markdown-poiUsage
<template>
  <markdown-poi :raw="sourceString" inline />
</template>import MarkdownPoi from 'vue-markdown-poi'
// ...
  components: {
    MarkdownPoi
  },
  data () {
    return {
      sourceString: `
~strikeout~*bold*/italic/ ~*/sbi/*~ /*~ibs~*/
- Bullet
> Quote
      `
    }
  },
// ...Props
- raw String: Text to be parsed and rendered.
- inline Boolean: If text should be rendered without multiline tags (only renders strikeout/bold/italics in this mode). Useful if you want a summary preview of content.
Syntax
Style (any combination of):
- *bold*bold
- /italics/italics
- ~strikethrough~- strikethrough
Blocks (must start on a new line, no nesting):
- - Bullets
> Quotes
Paragraphs: Delineated by multiple consecutive newlines.
Links: Parses urls starting with http(s) or www.