Forum


Replies: 1   Views: 1134
Replacevariablebyhtml - keep font size and font face
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 royh  · 08-06-2021 - 20:25

I have a WYSIWYG editor where a user can capture HTML. When I use replaceVariableByHTML I want to import the HTML but keep the font size and font face the same as the template variable but allow the other elements of the HTML. How can I do this?

Here is the HTML it generates:

<ul>
<li>This</li>
<li>Is
<ul>
<li>A</li>
</ul>
</li>
<li>Test</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 50%;"><strong>Header</strong></td>
<td style="width: 50%;"><strong>Header</strong></td>
</tr>
<tr>
<td style="width: 50%;">Contents</td>
<td style="width: 50%;">Contents</td>
</tr>
</tbody>
</table>