A JavaScript Markdown parser and renderer
Translation pending
Developer toolsJavaScript · CSSGitHub @craigahobbsOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Loading the full README. The saved excerpt is shown below.
The markdown-model package is a JavaScript Markdown parser and renderer.
• API Documentation
• Source code
To parse a Markdown document, use the
parseMarkdown
function:
~~~ javascript
import {parseMarkdown} from 'markdown-model/lib/parser.js';
const markdownModel = parseMarkdown(markdownText);
~~~
Note: Markdown documents are parsed as
GitHub Flavored Markdown
(with the exception of HTML blocks).
To render the parsed Markdown in a web browser, use the
markdownElements
function with the
renderElements
function from the
element-model
package:Read the full README ↗The markdown-model package is a JavaScript Markdown parser and renderer.
To parse a Markdown document, use the parseMarkdown function:
import {parseMarkdown} from 'markdown-model/lib/parser.js';
const markdownModel = parseMarkdown(markdownText);
Note: Markdown documents are parsed as GitHub Flavored Markdown (with the exception of HTML blocks).
To render the parsed Markdown in a web browser, use the markdownElements function with the renderElements function from the element-model package:
import {markdownElements} from 'markdown-model/lib/elements.js';
import {renderElements} from 'element-model/lib/elementModel.js';
renderElements(document.body, markdownElements(markdownModel));
To compute the title of the parsed Markdown, use the getMarkdownTitle function:
import {getMarkdownTitle} from 'markdown-model/lib/parser.js';
const markdownTitle = getMarkdownTitle(markdownModel);
This package is developed using javascript-build. It was started using javascript-template as follows:
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