PHPackages                             s9e/text-formatter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. s9e/text-formatter

ActiveLibrary[Image &amp; Media](/categories/media)

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.

2.19.3(6mo ago)2413.1M↑11.2%40[3 issues](https://github.com/s9e/TextFormatter/issues)[2 PRs](https://github.com/s9e/TextFormatter/pulls)20MITPHPPHP ^8.1CI passing

Since Aug 12Pushed 2mo ago13 watchersCompare

[ Source](https://github.com/s9e/TextFormatter)[ Packagist](https://packagist.org/packages/s9e/text-formatter)[ Docs](https://github.com/s9e/TextFormatter/)[ RSS](/packages/s9e-text-formatter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (160)Used By (20)

Overview
--------

[](#overview)

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.)

[![Packagist Version](https://camo.githubusercontent.com/7242fad3d07be9da73d09ad7ed8c20061ac3ae540cd9c94d77c3ce8de97cd66c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7339652f746578742d666f726d6174746572)](https://packagist.org/packages/s9e/text-formatter)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/1d02c863835b2e2731065bfd597fcc1baa1be2365a8af294c1d2530f82c5cb40/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7339652f54657874466f726d61747465722f6261646765732f7175616c6974792d73636f72652e706e673f733d33393432646162336334313066623963653032303031653734343664313038336661393131373263)](https://scrutinizer-ci.com/g/s9e/TextFormatter/)[![Code Coverage](https://camo.githubusercontent.com/b73ecd79562a0a374df0a7e5420561b69c3089852fafd55a7c2a86dc05b65dd9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7339652f54657874466f726d61747465722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/s9e/TextFormatter/?branch=master)[![Documentation](https://camo.githubusercontent.com/0d8b5a818a22a923f115a263de95ed46bdbbf1a57ad3cf0faa8189c83d8042d4/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f73396574657874666f726d61747465722f62616467652f)](https://s9etextformatter.readthedocs.io/)

Installation
------------

[](#installation)

The best way to install s9e\\TextFormatter is via Composer. See [Installation](https://s9etextformatter.readthedocs.io/Getting_started/Installation/).

```
composer require s9e/text-formatter
```

Examples
--------

[](#examples)

If you can only read one example, [read how to use a bundle](https://s9etextformatter.readthedocs.io/Getting_started/Using_predefined_bundles/).

You can run the scripts directly from the [examples directory](https://github.com/s9e/TextFormatter/blob/master/docs/examples) and you will find in [the manual](https://s9etextformatter.readthedocs.io/) a description of each plugin as well as other examples.

Versioning
----------

[](#versioning)

Versioning is meant to follow [Semantic Versioning](https://semver.org/). You can [read about API changes in the documentation](https://s9etextformatter.readthedocs.io/Internals/API_changes/).

Online demo
-----------

[](#online-demo)

You can try the JavaScript version in this [BBCodes + other stuff demo](https://s9e.github.io/TextFormatter/demo.html), or this [Markdown + stuff (Fatdown) demo](https://s9e.github.io/TextFormatter/fatdown.html).

Development tools
-----------------

[](#development-tools)

The following tools are used during development.

- [phpunit/phpunit](https://phpunit.de/) 9.6.20 runs a full suite of tests before every commit.
- [code-lts/doctum](https://github.com/code-lts/doctum) 5.5.4 generates the [API docs](https://s9e.github.io/TextFormatter/api/).
- Scrutinizer is used for code tracking.

###  Health Score

70

—

ExcellentBetter than 100% of packages

Maintenance77

Regular maintenance activity

Popularity61

Solid adoption and visibility

Community35

Small or concentrated contributor base

Maturity90

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 99.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~27 days

Recently: every ~119 days

Total

137

Last Release

185d ago

Major Versions

0.13.1 → 1.0.02018-01-04

1.4.4 → 2.0.02019-05-31

1.4.5 → 2.0.12019-06-06

PHP version history (6 changes)0.1.0PHP &gt;=5.3.3

0.12.0PHP &gt;=5.4.7

2.0.0PHP &gt;=7.1

2.12.0PHP &gt;=7.4

2.14.0PHP ^8.0

2.15.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/06ce60f935a636cbb13d7ca4733fa28c9a2c9d500834c6481f86e05fd4a55e86?d=identicon)[s9e](/maintainers/s9e)

---

Top Contributors

[![JoshyPHP](https://avatars.githubusercontent.com/u/317712?v=4)](https://github.com/JoshyPHP "JoshyPHP (6583 commits)")[![davwheat](https://avatars.githubusercontent.com/u/7406822?v=4)](https://github.com/davwheat "davwheat (2 commits)")[![gijs-martens](https://avatars.githubusercontent.com/u/79847451?v=4)](https://github.com/gijs-martens "gijs-martens (1 commits)")[![marc1706](https://avatars.githubusercontent.com/u/394418?v=4)](https://github.com/marc1706 "marc1706 (1 commits)")[![primehalo](https://avatars.githubusercontent.com/u/86633?v=4)](https://github.com/primehalo "primehalo (1 commits)")[![clarkwinkelmann](https://avatars.githubusercontent.com/u/5264300?v=4)](https://github.com/clarkwinkelmann "clarkwinkelmann (1 commits)")[![Un1matr1x](https://avatars.githubusercontent.com/u/534448?v=4)](https://github.com/Un1matr1x "Un1matr1x (1 commits)")[![dragomano](https://avatars.githubusercontent.com/u/229402?v=4)](https://github.com/dragomano "dragomano (1 commits)")

---

Tags

bbcodeemojiemoticonsmarkdownparserhtmlmarkdownmediashortcodesblogforumembedmarkupemojiengineemoticonsbbcodebbcodescensor

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/s9e-text-formatter/health.svg)

```
[![Health](https://phpackages.com/badges/s9e-text-formatter/health.svg)](https://phpackages.com/packages/s9e-text-formatter)
```

###  Alternatives

[essence/essence

Extracts information about medias on the web, like youtube videos, twitter statuses or blog articles.

770562.9k3](/packages/essence-essence)[dereuromark/media-embed

A PHP library to deal with all those media services around, parsing their URLs and embedding their audio/video content in websites.

182530.3k11](/packages/dereuromark-media-embed)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[talvbansal/media-manager

A media browser and uploader for laravel apps written in vue js and bootstrap

20827.7k4](/packages/talvbansal-media-manager)[fg/multiplayer

Builds customizable video embed codes from any URL.

446.8k1](/packages/fg-multiplayer)[joypixels/assets

Emoji in png format brought to you by JoyPixels. JoyPixels is a complete set of emojis designed for the web. Licensing required: https://www.joypixels.com/licenses.

67117.9k](/packages/joypixels-assets)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
