A pluggable Markdown-to-HTML converter.
The library ships a lightweight built-in converter (via DefaultMarkdownParser) that covers headings, bold, italic, strikethrough, inline code, links, images, lists, blockquotes, fenced code blocks, and GFM tables with column alignment.
For full CommonMark / GFM support, consumers can supply their own implementation backed by a third-party parser such as marked or markdown-it.
marked
markdown-it
This module has no Angular dependency — it is plain TypeScript and can be used in any context (Angular DI, server-side, tests, etc.).
import { DefaultMarkdownParser } from '@theredhead/lucid-foundation';const parser = new DefaultMarkdownParser();const html = parser.toHtml('# Hello\n\n**world**'); Copy
import { DefaultMarkdownParser } from '@theredhead/lucid-foundation';const parser = new DefaultMarkdownParser();const html = parser.toHtml('# Hello\n\n**world**');
Converts a Markdown string to an HTML string.
The raw Markdown source text.
An HTML string.
A pluggable Markdown-to-HTML converter.
The library ships a lightweight built-in converter (via DefaultMarkdownParser) that covers headings, bold, italic, strikethrough, inline code, links, images, lists, blockquotes, fenced code blocks, and GFM tables with column alignment.
For full CommonMark / GFM support, consumers can supply their own implementation backed by a third-party parser such as
markedormarkdown-it.This module has no Angular dependency — it is plain TypeScript and can be used in any context (Angular DI, server-side, tests, etc.).
Example