@nitonodev/aeromd
TypeScript icon, indicating that this package has built-in type declarations

3.1.0 • Public • Published

@nitonodev/aeromd

The lightweight markdown parser for ts or js


See changes at CHANGELOG.md



Installation

This package contains a built-in declaration for TypeScript, therefore you do not need to install types for this package separately.
npm i @nitonodev/aeromd

Usage

Connecting

To connect this library to you code you may to write next lines of code
// if you use a commonjs
const { MarkdownParser } = require('@nitonodev/aeromd');
// if you use a esm
import { MarkdownParser } from '@nitonodev/aeromd';

Quick Start

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');

Parse markdown data

If you want to parse markdown data to html code you may to use a parse function
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>

Use styles

To use styles you may to write this lines
+ import '@nitonodev/aeromd/lib/styles/md-theme.css'

For future

  • Write library for other programming languages

Feedback

You can write me to pyto015@ya.ru or open issue at Github repo

Links

Package Sidebar

Install

npm i @nitonodev/aeromd

Weekly Downloads

1

Version

3.1.0

License

ISC

Unpacked Size

13 kB

Total Files

8

Last publish

Collaborators

  • nitono