jub0t / MarkdownX

Unleash the Power of Markdown with Tailwind CSS Compatibility

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Markdown For Tailwinds

⚡ Markdown parser compatible with Tailwind Css. Prism.js themes can be found here.

Preview

Installation

Get the file from Releases, get styles from here

Usage

// Initialized
const Parser = new Tayparser();
// Parse Markdown
const MarkdownCode = `
# Blog Post
`;
const Code = Parser.parse(MarkdownCode);
console.log(Code);
// Highlight All <pre> Snippets
Prism.highlightAll();
// Escape HTML
const Markdown = new TailDown({ escapeHTML: true });

Config

const Markdown = new TailDown({
  a: {
    customClass: "hover:text-blue-500",
    extendStyle: "display: block;",
  },
  h3: {
    customClass: "text-gray-600",
    extendStyle: "display: block;",
  },
});

About

Unleash the Power of Markdown with Tailwind CSS Compatibility

License:MIT License


Languages

Language:TypeScript 99.8%Language:JavaScript 0.1%Language:HTML 0.1%