From 5ed0f170935ce38ca540df68ac554bfbf6f8ae64 Mon Sep 17 00:00:00 2001 From: MichaelFrey Date: Tue, 28 Jan 2025 04:09:07 +0100 Subject: [PATCH 1/2] Writer HTML: Support Default font color --- docs/changes/1.x/1.4.0.md | 3 +- src/PhpWord/Writer/HTML/Part/Body.php | 2 +- src/PhpWord/Writer/HTML/Part/Head.php | 5 +-- tests/PhpWordTests/Writer/HTML/FontTest.php | 39 ++++++++++++++++++--- 4 files changed, 41 insertions(+), 8 deletions(-) diff --git a/docs/changes/1.x/1.4.0.md b/docs/changes/1.x/1.4.0.md index cb12a3f68a..5189924e31 100644 --- a/docs/changes/1.x/1.4.0.md +++ b/docs/changes/1.x/1.4.0.md @@ -11,7 +11,8 @@ - Writer Word2007: Support for padding in Table Cell by [@Azamat8405](https://github.com/Azamat8405) in [#2697](https://github.com/PHPOffice/PHPWord/pull/2697) - Added support for PHP 8.4 by [@Progi1984](https://github.com/Progi1984) in [#2660](https://github.com/PHPOffice/PHPWord/pull/2660) - Autoload : Allow to use PHPWord without Composer fixing [#2543](https://github.com/PHPOffice/PHPWord/issues/2543), [#2552](https://github.com/PHPOffice/PHPWord/issues/2552), [#2716](https://github.com/PHPOffice/PHPWord/issues/2716), [#2717](https://github.com/PHPOffice/PHPWord/issues/2717) in [#2722](https://github.com/PHPOffice/PHPWord/pull/2722) -- Add Default font color for Word by [@Collie-IT](https://github.com/Collie-IT) in [#2700](https://github.com/PHPOffice/PHPWord/pull/2700) +- Writer Word2007: Support Default font color by [@Collie-IT](https://github.com/Collie-IT) in [#2700](https://github.com/PHPOffice/PHPWord/pull/2700) +- Writer HTML: Support Default font color by [@MichaelPFrey](https://github.com/MichaelPFrey) ### Bug fixes diff --git a/src/PhpWord/Writer/HTML/Part/Body.php b/src/PhpWord/Writer/HTML/Part/Body.php index 4a391b53ef..bad1415c21 100644 --- a/src/PhpWord/Writer/HTML/Part/Body.php +++ b/src/PhpWord/Writer/HTML/Part/Body.php @@ -23,7 +23,7 @@ use PhpOffice\PhpWord\Writer\PDF\TCPDF; /** - * RTF body part writer. + * HTML body part writer. * * @since 0.11.0 */ diff --git a/src/PhpWord/Writer/HTML/Part/Head.php b/src/PhpWord/Writer/HTML/Part/Head.php index 32761a7959..79235e1c4a 100644 --- a/src/PhpWord/Writer/HTML/Part/Head.php +++ b/src/PhpWord/Writer/HTML/Part/Head.php @@ -30,7 +30,7 @@ use PhpOffice\PhpWord\Writer\HTML\Style\Table as TableStyleWriter; /** - * RTF head part writer. + * HTML head part writer. * * @since 0.11.0 */ @@ -85,11 +85,12 @@ public function write() private function writeStyles(): string { $css = '