Skip to content

This PHP class can convert html to plaintext and plaintext to html.

License

Notifications You must be signed in to change notification settings

maxbeckers/htmlconverter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HtmlConverter PHP Class

This PHP class can convert html to plaintext and plaintext to html.

Installation

You can just run composer require to add this package on your app.

  composer require maxbeckers/htmlconverter

Examples

Html to plaintext

...
use MaxBeckers\HtmlConverter\HtmlConverter;
...

$html = '...some html stuff...';

$converter = new HtmlConverter();

$plaintext = $converter->htmlToPlain($html);

Plaintext to Html

...
use MaxBeckers\HtmlConverter\HtmlConverter;
...

$plaintext = '...some plaintext stuff...';

$converter = new HtmlConverter();

$html = $converter->plainToHtml($plaintext);

About

This PHP class can convert html to plaintext and plaintext to html.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages