mrshanebarron/markdown 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

mrshanebarron/markdown

Composer 安装命令:

composer require mrshanebarron/markdown

包简介

Markdown renderer component for Laravel - supports Livewire and Vue

README 文档

README

A markdown renderer component for Laravel applications. Converts markdown text to styled HTML. Works with Livewire and Vue 3.

Installation

composer require mrshanebarron/markdown

Livewire Usage

Basic Usage

<livewire:sb-markdown :content="$markdownContent" />

With Custom Styling

<livewire:sb-markdown
    :content="$article"
    prose-class="prose-lg prose-blue"
/>

Livewire Props

Prop Type Default Description
content string '' Markdown content
prose-class string '' Additional prose classes

Vue 3 Usage

Setup

import { SbMarkdown } from './vendor/sb-markdown';
app.component('SbMarkdown', SbMarkdown);

Basic Usage

<template>
  <SbMarkdown :content="markdown" />
</template>

<script setup>
const markdown = `
# Hello World

This is **bold** and *italic* text.

## Lists

- Item one
- Item two
- Item three

## Code

\`\`\`javascript
const greeting = 'Hello!';
console.log(greeting);
\`\`\`
`;
</script>

Blog Post Example

<template>
  <article class="max-w-3xl mx-auto py-8">
    <h1 class="text-4xl font-bold mb-4">{{ post.title }}</h1>
    <p class="text-gray-500 mb-8">{{ post.date }}</p>

    <SbMarkdown
      :content="post.content"
      prose-class="prose-lg"
    />
  </article>
</template>

Documentation Viewer

<template>
  <div class="flex">
    <nav class="w-64 p-4 border-r">
      <button
        v-for="doc in docs"
        :key="doc.id"
        @click="activeDoc = doc"
        class="block w-full text-left px-3 py-2 rounded hover:bg-gray-100"
      >
        {{ doc.title }}
      </button>
    </nav>

    <main class="flex-1 p-8">
      <SbMarkdown :content="activeDoc.content" />
    </main>
  </div>
</template>

Vue Props

Prop Type Default Description
content String '' Markdown string
proseClass String '' Additional Tailwind prose classes

Supported Syntax

Markdown Output
# Heading <h1>
## Heading <h2>
### Heading <h3>
**bold** <strong>
*italic* <em>
~~strikethrough~~ <del>
`code` <code>
``` <pre><code>
[link](url) <a>
![alt](src) <img>
* item <ul><li>
1. item <ol><li>
> quote <blockquote>
--- <hr>

Features

  • Headers: H1, H2, H3 support
  • Emphasis: Bold, italic, strikethrough
  • Links: External links with noopener
  • Images: Rounded image styling
  • Lists: Ordered and unordered
  • Code: Inline and block code
  • Blockquotes: Quote styling
  • Prose Styling: Tailwind Typography

Styling

Uses Tailwind CSS Typography:

  • Prose base styling
  • Customizable with prose modifiers
  • Automatic paragraph spacing
  • Code block styling
  • Link styling

Requirements

  • PHP 8.1+
  • Laravel 10, 11, or 12
  • Tailwind CSS 3.x
  • @tailwindcss/typography (recommended)

License

MIT License

mrshanebarron/markdown 适用场景与选型建议

mrshanebarron/markdown 是一款 基于 Vue 开发的 Composer 扩展包,目前已累计 16 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 14 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 mrshanebarron/markdown 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mrshanebarron/markdown 我们能提供哪些服务?
定制开发 / 二次开发

基于 mrshanebarron/markdown 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-14