Forum


Replies: 3   Views: 457
Block inside of a variable
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  · 22-07-2023 - 10:23

Hello,

Although we have replied to your email, we post the same information:

  • Paragraphs are used to add contents. Block placeholders must be added in their own paragraphs to use cloneBlock. Your script is adding a single paragraph with soft line breaks.
  • Set block as type replacement when using replaceVariableByHTML. An inline replacement removes all block contents before adding them. On https://www.phpdocx.com/documentation/practical/wordfragments-and-wordml you can read more information about inline and block type replacements:

Regards.