Hello,
Using the following line:
$event_wf->addText($events_array);
all contents are added as inline (block tags are removed).
To accomplish the required task, you need to use a single WordFragment, where you add all content, instead of grouping them with addText:
$event_wf = new WordFragment($phpdocx, 'document');
$event_wf->addText('Text');
$itemList = array(
'Line 1', // you can add text strings or WordFragments if needed
'Line 2',
'Line 3',
'Line 4',
'Line 5'
);
$event_wf->addList($itemList, 1);
$event_wf->addText('More text');
$event_wf->addList($itemList, 1);
$docx->replaceVariableByWordFragment(array('DATA_EVENTS' => $event_wf));
WordFragments are very flexible and they allow adding a single content or group of contents.
Regards.