定制 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)

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固