markdown

@motioneffector/markdown

A lightweight, standards-compliant markdown parser for rendering user content safely.

npm version license TypeScript

Features

Read the full manual →

Quick Start

import { markdown, markdownStrip } from '@motioneffector/markdown'

// Convert markdown to HTML
const html = markdown('# Hello **world**!')
// => '<h1>Hello <strong>world</strong>!</h1>'

// Strip HTML to plain text
const plain = markdownStrip(html, 'plaintext')
// => 'Hello world!'

// GitHub Flavored Markdown table
const table = markdown(`
| Feature | Status |
|---------|--------|
| Tables  | ✓      |
`)

Testing & Validation

License

MIT © motioneffector