Forum


Replies: 3   Views: 1315
Phpdocx_link is adding/removing breaks
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 ralfjahr  · 06-04-2021 - 10:05

Hello,

I haven an issue when using phpdocx_link elements in html code which I am adding to my document.

You can see the problem here: https://cloud.quintet.io/index.php/s/bzBo6H8WMFX3FgW

When I use a phpdocx_link element it ignores breaks before the element, and adds a new line after the element. 

The code looks like this:

if($condition) {
    $string .= '<b><phpdocx_link data-text="' . $contact->getName() . '" data-url="#' . $contact->getHash() . '" /></b>';
} else {
    $string .= "<b>" . $contact->getName() . "</b>";
}


How can I change this behavior?

Thanks!