atomjoy/parsedown-media
Composer 安装命令:
composer require atomjoy/parsedown-media
包简介
Create audio, video, embed video and image gallery with slider from Markdown file.
关键字:
README 文档
README
Create audio, video, embed video and image gallery with slider from Markdown file.
Install
composer require atomjoy/parsedown-media
How to Media Files
<?php $p = new \Atomjoy\Parsedown\ParsedownMedia(); echo $p->text("{Description or empty}(embed)(https://www.youtube.com/embed/y5g3UMaODxo?si=evrMVC4n9DbZ3OQD)"); echo $p->text("{Description or empty}(video)(https://afe019d0-9895-400c-9385-5c25c4775c8e.mdnplay.dev/shared-assets/videos/flower.webm)"); echo $p->text("{Description or empty}(audio)(https://361fc8d0-210a-4e2b-9cff-6f13be3457ad.mdnplay.dev/shared-assets/audio/t-rex-roar.mp3)");
Created Media html
<!-- Embed --> <div class="media-wrapper"> <iframe width="100%" src="https://www.youtube.com/embed/NGsjwNsXE0w?si=eI0hyNw8NE_X61v4" style="aspect-ratio: 16/9;" frameborder="0" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" ></iframe> <p class="media-description">Video description goes here.</p> </div> <!-- Video --> <div class="media-wrapper"> <video controls="" width="100%" style="aspect-ratio: 16/9;"> <source src="https://afe019d0-9895-400c-9385-5c25c4775c8e.mdnplay.dev/shared-assets/videos/flower.webm" /> </video> <p class="media-description">Video description goes here.</p> </div>
How to ParsedownGallery
<?php $p = new \Atomjoy\Parsedown\ParsedownMedia(); // Default class .gallery-content echo $p->text("%%%\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\n%%%"); // Custom class .gallery-box echo $p->text("%%%box\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\n%%%");
Created ParsedownGallery html
<div class="gallery-wrapper"> <ul class="gallery-content"> <li> <img src="https://img.icons8.com/bubbles/100/google-logo.jpg" data-image="1" class="gallery-image gallery-image-1" alt="Image" /> </li> <li> <img src="https://img.icons8.com/bubbles/100/google-logo.jpg" data-image="2" class="gallery-image gallery-image-2" alt="Image" /> </li> <li> <img src="https://img.icons8.com/bubbles/100/google-logo.jpg" data-image="3" class="gallery-image gallery-image-3" alt="Image" /> </li> </ul> </div>
How to ParsedownGallerySplide
<?php $p = new \Atomjoy\Parsedown\ParsedownMedia(); echo $p->text("&&&\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\n&&&"); echo $p->text("&&&box\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\nhttps://img.icons8.com/bubbles/100/google-logo.jpg\n&&&");
Created ParsedownGallerySplide html
<div class="splide"> <div class="splide__track"> <ul class="splide__list"> <li class="splide__slide"> <img src="https://img.icons8.com/bubbles/200/google-logo.jpg" data-image="1" class="splide__image splide__image__1" alt="Image" /> </li> <li class="splide__slide"> <img src="https://img.icons8.com/bubbles/200/google-logo.jpg" data-image="2" class="splide__image splide__image__2" alt="Image" /> </li> <li class="splide__slide"> <img src="https://img.icons8.com/bubbles/200/google-logo.jpg" data-image="3" class="splide__image splide__image__3" alt="Image" /> </li> <li class="splide__slide"> <img src="https://img.icons8.com/bubbles/200/google-logo.jpg" data-image="4" class="splide__image splide__image__4" alt="Image" /> </li> <li class="splide__slide"> <img src="https://img.icons8.com/bubbles/200/google-logo.jpg" data-image="5" class="splide__image splide__image__5" alt="Image" /> </li> </ul> </div> </div>
Add Splide slider plugin and css
<script src="https://cdn.jsdelivr.net/npm/@splidejs/splide@4.1.4/dist/js/splide.min.js"></script> <link href="https://cdn.jsdelivr.net/npm/@splidejs/splide@4.1.4/dist/css/splide.min.css" rel="stylesheet" /> <script> /* Required */ document.addEventListener('DOMContentLoaded', (event) => { setTimeout(() => { new Splide('.splide').mount(); }, 1000); }); </script> <style> .splide { background: #fafafa; width: 100%; height: 400px; /* aspect-ratio: 16/9; */ } .splide__image { object-fit: cover; width: 100%; height: 400px; /* aspect-ratio: 16/9; */ } </style>
Parse ToDo List
Add fontawesome cdn links in head first.
### ToDo list fontawesome - [x] Finish my changes - [ ] Push my commits to GitHub - [ ] Open a pull request - [x] @mentions, #refs, [links](), **formatting**, and <del>tags</del> supported - [x] list syntax required (any unordered or ordered list supported) - [x] this is a complete item - [ ] this is an incomplete item
ToDo list html
<ul class="todo-list"> <li class="todo-item list-none"> <i class="todo-icon fas fa-check-square todo-icon-checked"></i> <span class="todo-text">Finish my changes</span> </li> <li class="todo-item list-none"> <i class="todo-icon far fa-square"></i> <span class="todo-text">Push my commits to GitHub</span> </li> <li class="todo-item list-none"> <i class="todo-icon far fa-square"></i> <span class="todo-text">Open a pull request</span> </li> <li class="todo-item list-none"> <i class="todo-icon fas fa-check-square todo-icon-checked"></i> <span class="todo-text" >@mentions, #refs, [links](), **formatting**, and <del>tags</del> supported</span > </li> <li class="todo-item list-none"> <i class="todo-icon fas fa-check-square todo-icon-checked"></i> <span class="todo-text" >list syntax required (any unordered or ordered list supported)</span > </li> <li class="todo-item list-none"> <i class="todo-icon fas fa-check-square todo-icon-checked"></i> <span class="todo-text">this is a complete item</span> </li> <li class="todo-item list-none"> <i class="todo-icon far fa-square"></i> <span class="todo-text">this is an incomplete item</span> </li> </ul>
Secure input (optional)
$p = new ParsedownMedia(); $p->setSafeMode(true);
atomjoy/parsedown-media 适用场景与选型建议
atomjoy/parsedown-media 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「parser」 「markdown」 「markdown-gallery」 「markdown-media」 「markdown-audio」 「markdown-video」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 atomjoy/parsedown-media 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 atomjoy/parsedown-media 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 atomjoy/parsedown-media 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Texy converts plain text in easy to read Texy syntax into structurally valid (X)HTML. It supports adding of images, links, nested lists, tables and has full support for CSS. Texy supports hyphenation of long words (which reflects language rules), clickable emails and URL (emails are obfuscated again
Easy to use SDK with grabber for multiple platforms at once like YouTube, Dailymotion, Facebook and more.
An MT940 bank statement parser for PHP
Adds more BBCode
Laravel integration for the jsonapi.org parser
A modern HTML DOM parser for PHP using DOMDocument and Symfony CssSelector.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 41
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-05