Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

markdown-model

Package Overview
Dependencies
1
Maintainers
1
Versions
46
Issues
File Explorer

Advanced tools

markdown-model

Markdown object model, parser, and renderer

    1.4.6latest

Version published
Maintainers
1
Yearly downloads
5,828

Weekly downloads

Readme

Source

markdown-model

npm GitHub

markdown-model API Documentation

markdown-model is a JavaScript Markdown parsing and rendering library.

To parse a Markdown document and produce a Markdown model, use the parseMarkdown function:

import {parseMarkdown} from 'markdown-model/parser.js'; const markdownModel = parseMarkdown(markdownText);

To render the Markdown model in a web browser, use the markdownElements function with the renderElements function from the element-model package:

import {markdownElements} from 'markdown-model/elements.js'; import {renderElements} from 'element-model/elementModel.js'; renderElements(document.body, markdownElements(markdownModel));

You can compute the title of a Markdown document from the Markdown model using the getMarkdownTitle function:

import {getMarkdownTitle} from 'markdown-model/markdownModel.js'; const markdownTitle = getMarkdownTitle(markdownModel);

The validateMarkdownModel function is used to validate Markdown models from untrusted sources or for testing the validity of any code that produces a Markdown model:

import {validateMarkdownModel} from 'markdown-model/markdownModel.js'; validateMarkdownModel(markdownModel);

Development

markdown-model is developed using javascript-build and it was started using javascript-template:

template-specialize javascript-template/template/ markdown-model/ -k package markdown-model -k name 'Craig A. Hobbs' -k email '[email protected]' -k github 'craigahobbs' -k noapp 1

Keywords

FAQs

What is markdown-model?

Markdown object model, parser, and renderer

Is markdown-model popular?

The npm package markdown-model receives a total of 17 weekly downloads. As such, markdown-model popularity was classified as not popular.

Is markdown-model well maintained?

We found that markdown-model demonstrated a healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 14 May 2022
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc