preact-markdown
v2.1.0
Published
Markdown in Preact Markup
Downloads
2,195
Readme
preact-markdown
Markdown in Preact Markup using Marked
Install
npm i preact-markdown
Usage
import Markdown from 'preact-markdown';
render(<Markdown markdown={'**Hello** _World_!'} markupOpts={...} markedOpts={...} />, document.body);
or hyperscript style:
h(Markdown, {markdown: '**Hello** _World_!', markupOpts: {...}, markedOpts: {...}})
// or simply:
Markdown('**Hello** _World_!', {markupOpts:{...}, markedOpts:{...}})