@nitonodev/aeromd
v3.1.0
Published
The lightweight markdown parser for js/ts
Downloads
6
Maintainers
Readme
@nitonodev/aeromd
The lightweight markdown parser for ts
or js
See changes at CHANGELOG.md
npm i @nitonodev/aeromd
// if you use a commonjs
const { MarkdownParser } = require('@nitonodev/aeromd');
// if you use a esm
import { MarkdownParser } from '@nitonodev/aeromd';
To create a class you may to write next lines of code
// Instead of mp your variable name
// Instead of '# Hello' your markdown code
const mp = new MarkdownParser('# Hello');
| name of function | return value | params | | ---------------- | ------------------ | ----------------------------------------------------------------------- | | parse | string (html code) | optional m by default is markdown code who declared in class definition |
Example:
const mp = new MarkdownParser('# Hello');
// if you want to use default value from class definition
mp.parse(); // => <div id="html"><div id="body"><h1>Hello</h1></div></div>
// if you want to use custom parsing value
mp.parse('## Hello, World !'); // => <div id="html"><div id="body"><h2>Hello, World !</h2></div></div>
+ import '@nitonodev/aeromd/lib/styles/md-theme.css'
- Write library for other programming languages
You can write me to [email protected] or open issue at Github repo
Links
- Github: https://github.com/nitono/aeromd
- npm: https://www.npmjs.com/package/@nitonodev/aeromd