kopia lustrzana https://github.com/newroco/mail2deck
22 wiersze
401 B
PHP
22 wiersze
401 B
PHP
<?php
|
|
|
|
use League\HTMLToMarkdown\HtmlConverter;
|
|
|
|
class ConvertToMD {
|
|
protected $html;
|
|
|
|
public function __construct($html) {
|
|
$this->converter = new HtmlConverter([
|
|
'strip_tags' => true,
|
|
'remove_nodes' => 'title'
|
|
]);
|
|
$this->html = $html;
|
|
}
|
|
|
|
public function execute()
|
|
{
|
|
return $this->converter->convert($this->html);
|
|
}
|
|
}
|
|
|
|
?>
|