Forum


Replies: 4   Views: 1284
No linebreak after <p> tag using replacevariablebyhtml
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 blocked-falcana-blocked  · 04-12-2020 - 10:36

Hello,

We switched from phpdocx4 to phpdocx11 and now with replaceVariableByHTML there is no line break after the closing </p> tag. The contents of the <p></p> tags are always lined up one after the other.

We have set the option

'strictWordStyles' => true

and I have also tried the settings

'isFile' => false

and

'parseDivsAsPs' => true

as described in the following article 
https://www.phpdocx.com/en/forum/default/topic/681
We already tried the help described there, tidy is activated.

The final call:

$docx->replaceVariableByHtml($var_name, 'inline', $value, $html_options);

Can we fix this with another configuration or is this a bug?

Thanks for any help!