moodle/lib/html2text
2024-08-20 11:14:29 +08:00
..
src MDL-82828 core: Update Html2Text to version 4.3.2 2024-08-20 11:14:29 +08:00
composer.json MDL-82828 core: Update Html2Text to version 4.3.2 2024-08-20 11:14:29 +08:00
lib.php MDL-82828 core: Remove html2text overrides for missing mbstring 2024-08-20 11:14:29 +08:00
README.md MDL-82828 core: Update Html2Text to version 4.3.2 2024-08-20 11:14:29 +08:00
readme_moodle.txt MDL-82828 core: Remove html2text overrides for missing mbstring 2024-08-20 11:14:29 +08:00

Html2Text

A PHP library for converting HTML to formatted plain text.

Build status

Installing

composer require html2text/html2text

Basic Usage

$html = new \Html2Text\Html2Text('Hello, &quot;<b>world</b>&quot;');

echo $html->getText();  // Hello, "WORLD"

History

This library started life on the blog of Jon Abernathy http://www.chuggnutt.com/html2text

A number of projects picked up the library and started using it - among those was RoundCube mail. They made a number of updates to it over time to suit their webmail client.

Now it has been extracted as a standalone library. Hopefully it can be of use to others.