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.