# 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. ```html ``` You can also get it on npm. ```bash npm install luna-markdown-viewer luna-gallery luna-carousel luna-syntax-highlighter --save ``` ```javascript import 'luna-syntax-highlighter/luna-syntax-highlighter.css' import 'luna-carousel/luna-carousel.css' import 'luna-gallery/luna-gallery.css' import 'luna-markdown-viewer/luna-markdown-viewer.css' import LunaMarkdownViewer from 'luna-markdown-viewer' ``` ## Usage ```javascript const markdownViewer = new LunaMarkdownViewer(container) markdownViewer.setOption({ markdown: '# h1' }) ``` ## Configuration * markdown(string): Markdown text to render.