s9e / text-formatter
Multi-purpose text formatting and markup library. Plugins offer support for BBCodes, Markdown, emoticons, HTML, embedding third-party media (YouTube, etc...), enhanced typography and more.
Installs: 2 496 185
Dependents: 24
Suggesters: 0
Security: 0
Stars: 233
Watchers: 14
Forks: 36
Open Issues: 1
Requires
- php: ^8.1
- ext-dom: *
- ext-filter: *
- lib-pcre: >=8.13
- s9e/regexp-builder: ^1.4
- s9e/sweetdom: ^3.4
Requires (Dev)
- code-lts/doctum: *
- friendsofphp/php-cs-fixer: ^3.52
- matthiasmullie/minify: *
- phpunit/phpunit: ^9.5
Suggests
- ext-curl: Improves the performance of the MediaEmbed plugin and some JavaScript minifiers
- ext-intl: Allows international URLs to be accepted by the URL filter
- ext-json: Enables the generation of a JavaScript parser
- ext-mbstring: Improves the performance of the PHP renderer
- ext-tokenizer: Improves the performance of the PHP renderer
- ext-xsl: Enables the XSLT renderer
- ext-zlib: Enables gzip compression when scraping content via the MediaEmbed plugin
- dev-master
- 2.18.0
- 2.17.3
- 2.17.2
- 2.17.1
- 2.17.0
- 2.16.0
- 2.15.1
- 2.15.0
- 2.14.3
- 2.14.2
- 2.14.1
- 2.14.0
- 2.13.1
- 2.13.0
- 2.12.3
- 2.12.2
- 2.12.1
- 2.12.0
- 2.11.5
- 2.11.4
- 2.11.3
- 2.11.2
- 2.11.1
- 2.11.0
- 2.10.0
- 2.9.4
- 2.9.3
- 2.9.2
- 2.9.1
- 2.9.0
- 2.8.6
- 2.8.5
- 2.8.4
- 2.8.3
- 2.8.2
- 2.8.1
- 2.8.0
- 2.7.6
- 2.7.5
- 2.7.4
- 2.7.3
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.1
- 2.4.0
- 2.3.7
- 2.3.6
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.0
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.1
- 2.0.0
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0.0
- 0.13.1
- 0.13.0
- 0.12.0
- 0.11.2
- 0.11.1
- 0.11.0
- 0.10.1
- 0.10.0
- 0.9.6
- 0.9.5
- 0.9.4
- 0.9.3
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.5
- 0.8.4
- 0.8.3
- 0.8.2
- 0.8.1
- 0.8.0
- 0.7.1
- 0.7.0
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.12
- 0.4.11
- 0.4.10
- 0.4.9
- 0.4.8
- 0.4.7
- 0.4.6
- 0.4.5
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.0
- dev-current/IframeAPIv3
- dev-current/SweetDOMWorkarounds
- dev-GitHubWorkflow
- dev-3.0/master
- dev-major/TemplateNormalizationsSweetDOM
- dev-minor/ParsedDOM
- dev-PHP8.2
- dev-current/vBulletinBundle
- dev-current/MediaEmbedAMP
- dev-current/UNIT3D
- dev-nightly
- dev-next/BBCodeDefinitionParser
- dev-2.5/TaskLists
- dev-2.5/LitedownAutolink
- dev-2.4/DisallowUnsupportedTags
- dev-2.4/XPathTester
- dev-2.4/BBCodeDefinitionParser
- dev-release/php5.3
- dev-release/php5.4
- dev-release/php5.5
- dev-release/php5.6
- dev-1.4/master
This package is auto-updated.
Last update: 2024-12-02 19:51:22 UTC
README
s9e\TextFormatter is a text formatting library that supports BBCode, Markdown, HTML and other markup via plugins. The library is written in PHP, with a JavaScript port also available for client-side preview (see below.)
Installation
The best way to install s9e\TextFormatter is via Composer. See Installation.
composer require s9e/text-formatter
Examples
If you can only read one example, read how to use a bundle.
You can run the scripts directly from the examples directory and you will find in the manual a description of each plugin as well as other examples.
Versioning
Versioning is meant to follow Semantic Versioning. You can read about API changes in the documentation.
Online demo
You can try the JavaScript version in this BBCodes + other stuff demo, or this Markdown + stuff (Fatdown) demo.
Development tools
The following tools are used during development.
- phpunit/phpunit 9.6.20 runs a full suite of tests before every commit.
- code-lts/doctum 5.5.4 generates the API docs.
- Scrutinizer is used for code tracking.