JavaScript API: replaceVariableWordFragment

replaceVariableWordFragment

PREMIUM TRIAL / ADVANCED

Replaces text variables with WordFragments.

Note

You are reading the JavaScript API documentation. For the PHP API method please go to replaceVariableByWordFragment.

Description
replaceVariableWordFragment (variables: Map<string, WordFragment>, target: Target = "document", options: OptionsReplaceVariableWordFragment = {}): this
Code samples

Example #1

The resulting Word document looks like:

Example #2

The resulting Word document looks like:

Release notes
  • phpdocx 15.0:
    • new method.