pstaender/silverstripe-markdown-parser
Composer 安装命令:
composer require pstaender/silverstripe-markdown-parser
包简介
Transforms markdown and markdown extra to HTML and vice versa
README 文档
README
Converts any string field to Markdown and vice versa.
Requirements
- Silverstripe 4+
Installation
Install with composer:
$ composer require pstaender/silverstripe-markdown-parser
Usage
After flushing your cache you can use the convertes in any template:
<article> $Content.markdown $Content.markdownExtra <p> $Title.inlineMarkdown </p> <p> $Title.inlineMarkdownExtra </p> <pre> $MyHTMLContent.htmlToMarkdown </pre> </article>
Configuration
Every converting should work as expected out of the box.
Under the hood the parsers Parsedown, ParsedownExtra and League\HTMLToMarkdown\HtmlConverter are used for conversion. Anyhow, if you need to different parsing options you can hook any parser with a custom Injector configuration.
License
MIT License
统计信息
- 总下载量: 527
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-06-21