derokorian/bbcode
Composer 安装命令:
composer require derokorian/bbcode
包简介
Simple BBCode parser
README 文档
README
Simple class to parse BBCodes
Install via composer
composer require derokorian/bbcodes
Use the class
use Dero\BBCodes\BBCodes;
echo (new BBCodes)->fullClean($string);
// alternately, call clean and provide the options to use
echo (new BBCodes)->clean($string, BBCodes::OPT_LIST | BBCodes::OPT_BASIC);
// The following options exist
BBCodes::OPT_URLS
BBCodes::OPT_BASE (pre, strike, b, i, u)
BBCodes::OPT_CODE
BBCodes::OPT_LIST
BBCodes::OPT_QUOTE
BBCodes::OPT_BASIC = OPT_URLS | OPT_BASE | OPT_CODE | OPT_LIST | OPT_QUOTE
BBCodes::OPT_TITLE
BBCodes::OPT_IMG
BBCodes::OPT_NOPARSE
BBCodes::OPT_FULL = OPT_BASIC | OPT_TITLE | OPT_IMG | OPT_NOPARSE
Tags
The following tags are available, depending on the options used. Tags are not case-sensitive.
[b]bold[/b]
[i]italic[/i]
[u]underline[/u]
[strike]struck through text[/strike]
[title]some title text[/title]
[subtitle]a smallter title text[/subtitle]
[list]
[item]list item[/item]
[item]list item[/item]
[/list]
[url]http://example.com[/url]
[url=http://example.com]some text[/url]
[urls]block of text containing many raw urls[/urls]
[img]http://url.to/image.jpg[/img]
[img=http://url.to/image.jpg]alt/title[/img]
[noparse]text not to be parsed for other BBCodes[/noparse]
[quote]something attributed to someone else[/quote]
[quote=author]something attributed to someone else[/quote]
[pre]preformatted text[/pre]
[code]some code that needs formatting maintained[/code]
Code Tag upgrade
By default the code tag only preserves formatting, however if you require the suggested GenSynth package - then code may be modified to specify the language
composer require derokorian/gen-synth
[code=language]code to be highlighted as the specific language[/code]
derokorian/bbcode 适用场景与选型建议
derokorian/bbcode 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 47 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 02 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 derokorian/bbcode 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 derokorian/bbcode 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 47
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-02-13