Forum


Replies: 1   Views: 1762
Inserting variable with enters
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 admin  · 10-12-2020 - 16:52

Hello,

You can replace a placeholder by a text with line breaks enabling the parseLineBreaks option available in some template methods (such as replaceVariableByText) or replacing the placeholder by a WordFragment with line breaks. In the package and the documentation pages you can find samples using both approaches; for example on the API page of replaceVariableByText: https://www.phpdocx.com/api-documentation/templates/replace-variable-text-Word-document.

Regards.