Skip to content

Unleash the Power of Markdown with Tailwind CSS Compatibility

License

Notifications You must be signed in to change notification settings

jub0t/MarkdownX

Repository files navigation

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;",
  },
});