sublinks-markdown
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

GitHub tag (latest SemVer) GitHub issues License GitHub stars

Sublinks Markdown

A markdown parser with rules for frontends of sublinks. Used to easily add markdown support compatible with the standard sublinks frontend.

About

Sublinks markdown is a package that can be imported into your frontend and then used to add markdown support through one function call. All of the markdown rules used in the standard sublinks frontend are supported meaning your users will see the same things as users using the standard frontend without you needing to implement every single rule yourself.

Install

This package is ESM only. To install with npm use:

npm i sublinks-markdown

Usage

To convert text from markdown syntax into html use the mdToHtml function

import { mdToHtml } from "sublinks-markdown";

const html = await mdToHtml("## Hello World", "example.com")

The first argument is the markdown you want converted and the second is the instance of the user currently interacting with the frontend (so things such as relative links populate properly).

Features

Readme

Keywords

none

Package Sidebar

Install

npm i sublinks-markdown

Weekly Downloads

41

Version

0.1.4

License

MIT

Unpacked Size

27.9 kB

Total Files

6

Last publish

Collaborators

  • ategon