antibodies-online/bootstrap-email
最新稳定版本:v1.0.5
Composer 安装命令:
composer require antibodies-online/bootstrap-email
包简介
A PHP port of bootstrap-email ruby package
README 文档
README
This is a port of Bootstrap Email. Thanks to @stuyam!
Installation
To install, add it to your composer.json file:
{
"require": {
"antibodies-online/bootstrap-email": "master"
}
}
or direct from packagist
composer require antibodies-online/bootstrap-email
Usage
You can use different methods to convert your boostrap-email html to an email client compatible html.
Use DomDocument
$scss = new ScssCompiler(); // Create a DOM Document $doc = new DOMDocument('1.0', 'UTF-8'); \libxml_use_internal_errors(true); $doc->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8')); \libxml_clear_errors(); $converter = new Compiler($scss); $doc = $converter->convert($doc); $html = $doc->saveHTML();
Use Html
$scss = new ScssCompiler(); $converter = new Compiler($scss); $html = $converter->compileHtml(<MY HTML STRING>);
Use Custom Scss
$scss = new ScssCompiler(); $scss->setScssFile(<PATH TO YOUR CUSTOM SCSS FILE); $scss->setScssHeadFile(<PATH TO YOUR CUSTOM HEAD SCSS FILE); $converter = new Compiler($scss); $html = $converter->compileHtml(<MY HTML STRING>);
Run Unit-Tests
composer test
Features missing
- Add Stack https://bootstrapemail.com/docs/stack
Documentations
For full documentation, visit bootstrapemail.com
Contributing
Really appreciate bug reports. Feel free to ask for additional functionality/fields. But be aware not all feature may be implemented. A Pull Request for your Features would be amazing.
Community
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
Discuss Bootstrap Email on GitHub
For PHP Port related questions, please open an issue.
统计信息
- 总下载量: 6.57k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-04-13