Hello
I have this HTML string converted by php function htmlentities
string(92) "<p>This special chars à è ì ù ò<br></p>"
When i use the function replaceVariableByHtml in output document there is the strings with all html tags like when i use replaceVariablebyText
this is my code:
require_once '../../core/com/phpdocx/classes/CreateDocx.inc';
$docx = new CreateDocxFromTemplate('template/template.docx');
$variabiliTemplate=$docx->getTemplateVariables();
//get my template varables
$sostituzioniDaModello = $memo->audit->getElementiModelloProgetto($proj->idmodello);
foreach ($sostituzioniDaModello as $index => $field){
if(in_array($field,$variabiliTemplate['document'])){
//get value of element and parse htlm
$html = htmlentities($proj->getElemento($index));
$docx->replaceVariableByHtml($field,'block',$html);
}
}
$docx->createDocx('template/documento.docx');
Can i help me?
Thanks for support