Forum


Replies: 3   Views: 338
Embedhtml sets both cell shading and text highlight
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by mschill  · 12-05-2025 - 07:59

Dear PHPDocx Team,

We are using embedHTML to export structured HTML tables to Word.
We apply style="background-color: #D9D9D9" directly to <td> elements in order to highlight specific table rows.

In the generated DOCX file, the cell appears correctly shaded.

However, it seems that an additional text highlight (w:highlight) is also applied.
As a result, even though the cell looks fine visually, users must also manually adjust or remove the text highlight when changing the shading color in Word – otherwise, the text retains the original background color from the highlight.

Our question:

    Is there a way to use embedHTML() so that only cell shading is applied, without any additional text highlighting?

    If not, would you consider adding an option such as "textHighlight" => false or "pureCellBackground" in a future release?

Thank you very much in advance for your feedback!

Best regards,
Anna