/mark-down

Markdown web-component

Primary LanguageJavaScriptCreative Commons Zero v1.0 UniversalCC0-1.0

Markdown web-component

A simple wrapper around showdown's markdown parser, in the form of a web-component.

Import/Include module

<script type="module" src="https://tomyo.github.io/mark-down/mark-down.js" >

Usage

  • Declarative

      <mark-down>
        # Some title
        ...
        A paragraph
        * A
        * List
      </mark-down>
  • Imperative

      document.querySelector('mark-down').innerHTML = `
        # Some title
        ...
        A paragraph
        * A
        * List
      `

More info