luna-markdown-viewer
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

Luna Markdown Viewer

Live markdown renderer.

Demo

https://luna.liriliri.io/?path=/story/markdown-viewer

Install

Add the following script and style to your page.

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-syntax-highlighter/luna-syntax-highlighter.css" />
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-markdown-viewer/luna-markdown-viewer.css" />
<script src="//cdn.jsdelivr.net/npm/luna-syntax-highlighter/luna-syntax-highlighter.js"></script>
<script src="//cdn.jsdelivr.net/npm/luna-markdown-viewer/luna-markdown-viewer.js"></script>

You can also get it on npm.

npm install luna-markdown-viewer luna-syntax-highlighter --save
import 'luna-syntax-highlighter/luna-syntax-highlighter.css'
import 'luna-markdown-viewer/luna-markdown-viewer.css'
import LunaMarkdownViewer from 'luna-markdown-viewer'

Usage

const markdownViewer = new LunaMarkdownViewer(container)
markdownViewer.setOption({ markdown: '# h1' })

Configuration

  • markdown(string): Markdown text to render.

Readme

Keywords

Package Sidebar

Install

npm i luna-markdown-viewer

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

605 kB

Total Files

12

Last publish

Collaborators

  • surunzi