mjohnson / decoda
A lightweight lexical string parser for BBCode styled markup.
Installs: 1 069 016
Dependents: 15
Suggesters: 1
Security: 0
Stars: 196
Watchers: 15
Forks: 52
Open Issues: 9
Requires
- php: >=7.3.0
- ext-mbstring: *
Requires (Dev)
- ext-json: *
- phpstan/phpstan: ^1.2
- phpunit/phpunit: ^9.5
Suggests
- ext-memcached: Cache data using Memcache
- ext-redis: Cache data using Redis
- dev-master
- 6.13.0
- 6.12.0
- 6.11.0
- 6.10.1
- 6.10.0
- 6.9.0
- 6.8.0
- 6.7.2
- 6.7.1
- 6.7.0
- 6.6.2
- 6.6.1
- 6.6.0
- 6.5.2
- 6.5.1
- 6.5.0
- 6.4.3
- 6.4.2
- 6.4.1
- 6.4.0
- 6.3.1
- 6.3.0
- 6.2.3
- 6.2.2
- 6.2.1
- 6.2.0
- 6.1.0
- 6.0.5
- 6.0.4
- 6.0.3
- 6.0.2
- 6.0.1
- 6.0.0
- 6.0.0-rc3
- 6.0.0-rc2
- 6.0.0-rc1
- 5.1.3
- 5.1.2
- 5.1.1
- 5.1.0
- 5.0.0
- 5.0.0-rc2
- 5.0.0-rc1
- 5.0.0-beta
- 4.x-dev
- 4.1.1
- 4.1.0
- 4.1.0-rc2
- 4.1.0-rc1
- 4.1.0-beta
- 4.0.2
- 4.0.1
- 4.0.0
- 4.0.0-beta
- 3.x-dev
- 3.5
- 3.4
This package is auto-updated.
Last update: 2024-10-10 22:54:07 UTC
README
A lightweight lexical string parser for BBCode styled markup.
Contributors
- "Marten-Plain" emoticons by MÃ¥rten Lundin - http://adiumxtras.com/index.php?a=xtras&xtra_id=6920
- "HTML_BBCodeParser" by Seth Price - http://pear.php.net/package/HTML_BBCodeParser/
Framework Integrations
- CakePHP - using Markup plugin.
- Symfony - using FMBbCodeBundle.
Features
- Parses custom code to valid (X)HTML markup
- Setting to make links and emails auto-clickable
- Setting to use shorthand text for links and emails
- Filters to parse markup and custom code
- Hooks to execute callbacks during the parsing cycle
- Loaders to load resources and files for configuration
- Engines to render complex markup using a template system
- Can censor offensive words
- Can convert smiley faces into images
- Basic support for localized messages
- Parser result caching
- Supports a wide range of tags
- Parent child node hierarchy
- Fixes incorrectly nested tags by removing the broken/unclosed tags
- Self closing tags
- Logs errors for validation
- Tag and attribute aliasing
Filters
The following filters and supported tags are available.
- Default - b, i, u, s, sup, sub, br, hr, abbr, time
- Block - align, float, hide, alert, note, div, spoiler, left, right, center, justify
- Code - code, source, var
- Email - email, mail
- Image - image, img
- List - list, olist, ol, ul, li, *
- Quote - quote
- Text - font, size, color, h1-h6
- Url - url, link
- Video - video, youtube, vimeo, veoh, liveleak, dailymotion, myspace, wegame, collegehumor
- Table - table, thead, tbody, tfoot, tr, td, th, row, col
Hooks
The following hooks are available.
- Censor - Censors all words found within config/censored
- Clickable - Converts all non-tag wrapped URLs and emails into clickable links
- Emoticon - Converts all smilies found within config/emoticons into emoticon images
Storage Engines
The following caching layers are supported.
- In-Memory
- Memcache
- Redis
Installation and Usage
See docs.