承接 sideshot/markdown2-tailwindui-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sideshot/markdown2-tailwindui-php

最新稳定版本:1.0.2

Composer 安装命令:

composer require sideshot/markdown2-tailwindui-php

包简介

An opinionated Markdown parser that outputs beautiful Tailwind UI HTML, with custom tags and embed support.

README 文档

README

Markdown2TailwindUI PHP is an opinionated Markdown parser that transforms plain Markdown into beautiful, responsive HTML layouts styled with Tailwind UI utility classes. It is designed for projects that want rich, styled content without custom CSS or manual HTML tweaks.

Features

  • Tailwind-Ready Output: All HTML is styled with Tailwind utility classes for instant, modern design.
  • Responsive Tables: Markdown tables are converted to responsive, styled layouts.
  • Smart Typography: Smart punctuation for better readability.
  • Embeds: Native support for YouTube, Twitter, GitHub, and more.
  • Custom Tags: Use [MPN:12345] to auto-link part numbers (customizable for your domain).
  • Table of Contents: Automatic TOC generation for long documents.
  • Heading Level Shifting: Optionally shift all headings to fit your page hierarchy.
  • Security: Escapes user input in custom tags to prevent XSS.

Limitations

  • This package is currently tailored for a specific project and may lack flexibility for all use cases.
  • Only a few custom tags are supported out of the box.
  • Configuration options are limited but will expand in future releases.

Roadmap

  • More flexible custom tag/plugin system
  • Additional configuration options
  • Improved accessibility and ARIA support
  • More embed providers

Installation

composer require sideshot/markdown2-tailwindui-php

Usage

use Sideshot\Markdown2TailwindUI;

$parser = new Markdown2TailwindUI(['base_header_level' => 3]);
$result = $parser->to_html($markdownString);
echo $result['toc'];   // Table of Contents HTML
echo $result['html'];  // Main HTML content

License

MIT

Author

Richard (@sideshot)

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-08