Hello,
-----------------------------------------------------------------------------------------------
UPDATE: phpdocx 15.5 added the following new feature for textboxes (https://www.phpdocx.com/news/post/phpdocx-15-5-release-notes/236):
· Support inline align to set "In line with text" wrapping style.
· New textboxStyle option to apply extra styles such as rotations.
· New direction option to set ltr or rtl direction.
-----------------------------------------------------------------------------------------------
Textboxes are added using absolute positions as default. To add a textbox as "in line with text" you can set an empty value in the align option. Please note that you can also add a textbox in a WordFragment to apply extra styles (such as paragraph styles).
For example:
$docx = new CreateDocx();
$docx->addTextBox('myval', array('align' => ''));
$docx->addText('my label');
$docx->addBreak();
$textBoxFragment = new WordFragment($docx);
$textBoxFragment->addTextBox('myval', array('align' => ''));
$docx->addText([$textBoxFragment], array('textAlign' => 'center'));
$docx->addText('my label');
$docx->createDocx('output');
Regards.