I have a custom code written for php to generate word. I want to create new custom paragraph style 'MyStyle' and it needs to be generated like font size '18' and style 'Calibri'. Here is my code as per phpword documentation
$phpWord->addParagraphStyle('MyStyle', array('align' => 'left', 'spaceAfter' => 100, 'spaceBefore' => 100));
$section->addText('This is a paragraph with my custom style', ['name' => 'Calibri', 'size' => 18], 'MyStyle');
This works fine and font style also applying to the above text. But styles are not applying to the custom paragraph style and rather it is applying to only text. When i edit the style in word I was unable to see seelcted font size to custom paragraph. In phpword how can I register font size and style on paragraph creation?