bitandblack/markdown-idml-converter
Composer 安装命令:
composer require bitandblack/markdown-idml-converter
包简介
Convert Markdown into (parts of) Adobe InDesign Markup Language Files (IDML).
README 文档
README
Bit&Black Markdown-IDML-Converter
Convert Markdown into (parts of) Adobe InDesign Markup Language Files (IDML).
Installation
This library is written in PHP and made for the use with Composer. Be sure to have both of them installed on your system.
As this library requires the IDML Creator — which requires a licence — be sure to get one at first. If not already part of your project, add the Composer credentials. (This is explained for example here.)
Add the library then to your project by running $ composer require bitandblack/markdown-idml-converter.
Usage
Converting Markdown into IDML Formatted Text
This library can convert a few Markdown formats into Paragraph and Character Styles. It can handle:
- The base "copy" paragraph
- Headlines from hierarchy 1 to 6
- An italic formatting
- A bold formatting
Therefore, the first step is to create an array with the styles, that should be used:
<?php use BitAndBlack\IdmlCreator\Content\Style\CharacterStyle; use BitAndBlack\IdmlCreator\Content\Style\ParagraphStyle; use BitAndBlack\MarkdownIdmlConverter\MarkdownToStyles; $formats = [ MarkdownToStyles::PARAGRAPH_STYLE_BODY => new ParagraphStyle('Body'), MarkdownToStyles::CHARACTER_STYLE_ITALIC => new CharacterStyle('Italic'), MarkdownToStyles::CHARACTER_STYLE_BOLD => new CharacterStyle('Bold'), ];
Second, the MarkdownToStyles class can be initialised with those styles and text can be converted:
<?php use BitAndBlack\MarkdownIdmlConverter\MarkdownToStyles; $markdownToStyles = new MarkdownToStyles($formats); $paragraphStyleRange = $markdownToStyles->convert($markdownFormattedText);
The result is a IDML ParagraphStyleRange, that can be handled using the IDML Creator.
Other Tools
Bit&Black offers some more tools to handle IDML files:
- The IDML-Creator library that allows creating IDML content natively in PHP in an object-oriented way. (A demo is available here.)
- The IDML-Writer library that can write IDML content into a valid IDML file.
- The IDML-Validator library that allows validating IDML files against the official schema from Adobe.
- The IDML-JSON-Converter library that allows converting Adobe InDesign Markup Language Files (IDML) into JSON and JSON into IDML.
Feel free to visit www.idml.dev for more information!
Help
If you have any questions feel free to contact us under hello@bitandblack.com.
Further information about Bit&Black can be found under www.bitandblack.com.
bitandblack/markdown-idml-converter 适用场景与选型建议
bitandblack/markdown-idml-converter 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 2, 最近一次更新时间为 2026 年 01 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 bitandblack/markdown-idml-converter 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bitandblack/markdown-idml-converter 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-19