Skip to content

Commit

Permalink
Merge pull request #806 from milan-ghevariya/html-strike-tag
Browse files Browse the repository at this point in the history
Add Strike HTML tag
  • Loading branch information
spipu authored Dec 3, 2024
2 parents 5b145f2 + 06d3137 commit 5cd96a4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Extension/Core/HtmlExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ protected function initTags()
new Html\Sub(),
new Html\Sup(),
new Html\U(),
new Html\StrikeTag(),
);
}
}
35 changes: 35 additions & 0 deletions src/Tag/Html/StrikeTag.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/**
* Html2Pdf Library - Tag class
*
* HTML => PDF converter
* distributed under the OSL-3.0 License
*
* @package Html2pdf
* @author Laurent MINGUET <[email protected]>
* @copyright 2017 Laurent MINGUET
*/

namespace Spipu\Html2Pdf\Tag\Html;
use Spipu\Html2Pdf\Tag\AbstractHtmlTag;
/**
* Tag StrikeTag
*/
class StrikeTag extends AbstractHtmlTag
{
public function __construct()
{
parent::__construct('strike');
}

public function getName()
{
return 'strike';
}

protected function overrideStyles()
{
$this->parsingCss->value['font-linethrough'] = true;
return true;
}
}

0 comments on commit 5cd96a4

Please sign in to comment.