Skip to content

Commit 54906ba

Browse files
committed
More Sample11, Fix Html, RTF Still Incomplete
1 parent de2828b commit 54906ba

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/PhpWord/Writer/HTML/Element/Text.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,11 @@ private function processFontStyle(): void
257257
$fontCSS = $styleWriter->write();
258258
if ($fontCSS) {
259259
$attributeStyle = ' style="' . $fontCSS . '"';
260+
} else {
261+
$className = $fontStyle->getStyleName();
262+
if ($className) {
263+
$attributeStyle = ' class="' . $className . '"';
264+
}
260265
}
261266
// Attribute Lang
262267
$lang = $fontStyle->getLang();

0 commit comments

Comments
 (0)