Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mtibben/html2text
PHP library to convert HTML to formatted plain text
https://github.com/mtibben/html2text
Last synced: 5 days ago
JSON representation
PHP library to convert HTML to formatted plain text
- Host: GitHub
- URL: https://github.com/mtibben/html2text
- Owner: mtibben
- Created: 2012-06-04T04:10:34.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-08-20T02:53:07.000Z (5 months ago)
- Last Synced: 2024-12-31T14:05:57.779Z (12 days ago)
- Language: PHP
- Homepage:
- Size: 138 KB
- Stars: 568
- Watchers: 23
- Forks: 176
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Html2Text
A PHP library for converting HTML to formatted plain text.
[![Build status](https://github.com/mtibben/html2text/actions/workflows/ci.yml/badge.svg)](https://github.com/mtibben/html2text/actions/workflows/ci.yml)
## Installing
```
composer require html2text/html2text
```## Basic Usage
```php
$html = new \Html2Text\Html2Text('Hello, "world"');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.