$table = array();
$table[] = array('Some label', '<div>some html, mainly list items</div>');
$table[] = array('Some label2', '<div>some html2, mainly list items</div>');
If build the table the following way :
$html = '<div>some html, mainly list items</div>';
$field_html = $docx->embedHTML($html, array('isFile' => false, 'rawWordML' => TRUE));
$table_html = $docx->createWordMLFragment(array($field_html));
$table = array();
$table_settings = array(
'header' => FALSE,
'html' => FALSE,
'rawWordML' => FALSE
);
$table[] = array('VAR_SYS_LABEL' => $label, 'VAR_SYS_VALUE' => $table_html);
Without a template this works just fine :
$docx->addTable($table, $table_settings);
However I need to use a template for styling reasons.
In my template I have a table with the following parameters : $VAR_SYS_LABEL$ | $VAR_SYS_VALUE$
$docx->addTemplateVariable($table, 'table', $table_settings);
The table is rendered correctly but the html is replaced with WordML code instead of HTML
Any ideas ?