Skip to content

Commit 25575c8

Browse files
authored
Add background color support for text boxes for Word writer
1 parent 1dc3dc6 commit 25575c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/PhpWord/Writer/Word2007/Element/TextBox.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ public function write(): void
5050
$xmlWriter->startElement('v:shape');
5151
$xmlWriter->writeAttribute('type', '#_x0000_t0202');
5252

53+
if ($style->getBgColor()) {
54+
$xmlWriter->writeAttribute('fillcolor', $style->getBgColor());
55+
}
5356
$styleWriter->write();
5457
$styleWriter->writeBorder();
5558

0 commit comments

Comments
 (0)