Forum


Replies: 3   Views: 180
Replacevariablebyhtml css not applying

Posted by jennygj  · 26-02-2024 - 14:09

Hi

Could you advise why the styles in $testValue may not be applied during docuemnt creation?

$placeholder = '$EXAMPLE$';

$testValue = '<style>p {color:red; font-weight:bold;}></style><p>Test HTML</p>';

$docx->replaceVariableByHTML($placeholder, 'inline', $testValue, ['addDefaultStyles' => false]);