Hi,
FYI : I'm using the trial version of PhpDocX.
I would like to use a template in which I would like to replace content of some variables by HTML. It's working but I can't manage that content coming from HTML respect the original template style.
Here is an example :
$docx = new CreateDocxFromTemplate('template.docx');
// Template
$variables = array(
'title' => 'Replace title',
'txt' => 'Replace text'
);
$docx->replaceVariableByText($variables);
// Html
$html = '<h1> My Main Title </h1> <h2> Sub Title </h2> <h3> Sub sub title </h3> <p> Some text </p> <ul><li> Item 1 </li><li> Item 2 </li><li> Item 3 </li></ul>';
$docx->replaceVariableByHTML(
'html',
'block',
$html
);
// Save
$docx->createDocx('hello_world');
As a result, the title have a style but the one from the original doc ...
Any help ?
Thanks.