PHPWord
PHPWord copied to clipboard
Add Paragraph Styling to the setComplexValue() on the TemplateProcessor
Is your feature request related to a problem? Please describe.
I am using the TemplateProcessor to add dynamic data to my template. The font styling imports successfully, but I can't add paragraph styling to injected data. (Alignment, line spacing, etc.)
Describe the solution you'd like
As with using the setComplexValue()
method, I would like to add paragraph styling in addition to the font styling.
Describe alternatives you've considered
I have altered the paragraph styling in the template itself, which works fine, however, for the system I am working on, I need to be able to inject dynamic paragraph styling for every TextRun into the template as defined by the user.
Additional context
Example:
$inline = new TextRun();
$inline->addText('by a red italic text', array('italic' => true, 'color' => 'red'), array('alignment' => 'center'));
$templateProcessor->setComplexValue('inline', $inline);
I also tried it, didn't work
Not working in 1.1.0